當你把裏面的工具用戶控件無法從事件窗口事件創建在用戶控件不工作
代碼在用戶控件內激活:
Public Class Commands
Event Clicks(sender As Object, e As EventArgs)
Private Sub Button1_ClickEvent(sender As Object, e As EventArgs) Handles Button1.ClickEvent
msgbox "Is Work In UserControl"
RaiseEvent Clicks(sender, e)
End Sub
代碼形式:
Private Sub Commands1_Click(sender As Object, e As EventArgs) Handles Commands1.Clicks
MsgBox("No Work IN Form")
End Sub
如果上面的代碼是正確的,那麼你需要改變'處理Button1.ClickEvent'到'處理Button1.Click'。 –
CodeJock控件名稱事件Click ClickEvent – user3495784