当我点击按钮时,我需要知道如何将Public Sub调用到主窗体中。我需要在列表框中的主窗体中显示类中完成的计算。
答案 0 :(得分:3)
您只需输入您的子名称。这是一个简单的例子:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
' Here you "call" the sub.
' If you have parameters you put them in the brackets.
YourSub()
End Sub
Public Sub YourSub() ' You can add parameters.
' Some code.
End Sub