按一下按钮没有触发它的方法VB.NET [英] button click not firing it's method VB.NET
本文介绍了按一下按钮没有触发它的方法VB.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我有我的按钮有问题。当我点击它,按钮的不触发的方式:
Hello I'm having a problem with my button. When I click it, the button's not firing the method:
Private Sub button1_Click(sender As System.Object, e As System.EventArgs)
'Initialize the capture device
grabber = New Capture()
grabber.QueryFrame()
'Initialize the FrameGraber event
AddHandler Application.Idle, New EventHandler(AddressOf FrameGrabber)
button1.Enabled = False
End Sub
什么我这里缺少什么?任何帮助是真正的AP preciated。谢谢你。
What am I missing in here? Any help is truly appreciated. Thanks.
推荐答案
有应该是这样
Private Sub button1_Click(sender As System.Object, e As System.EventArgs) Handles button1.Click
或
AddHandler button1.Click, AddressOf button1_Click
我想它的vb.net和WinForms。用VB6或WPF是一个解决方案稍有不同。
I suppose its vb.net and winforms. With VB6 or WPF is a solution little bit different.
这篇关于按一下按钮没有触发它的方法VB.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文