点击自定义按钮第二次会无响应
显示了自定义按钮但是显示不出系统按钮
点击了自定义按钮会无响应,也无法关闭vbhost.exe
Public Class Form1
Dim WithEvents 顺序 As 顺序结构 ‘顺序结构是自定义的一个按钮
Dim WithEvents BUTTON1 As System.Windows.Forms.Button
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Width = 900
Me.Height = 700
顺序 = New 顺序结构
顺序.Location = New Point(0, 0)
BUTTON1 = New Button
BUTTON1.Text = "bu"
BUTTON1.Location = New Point(0, 50)
Me.Controls.Add(BUTTON1)
Me.Controls.Add(顺序)
End Sub
Private Sub BUTTON1_Click(sender As Object, e As EventArgs) Handles BUTTON1.Click
MsgBox("DIANJI")
End Sub
Private Sub 顺序_Click(sender As Object, e As EventArgs) Handles 顺序.Click
MsgBox("DIANJIshunxu")
End Sub
End Class