示例:事件

在该示例中,在
事件
选项卡上选择的是
Click
TextChanged
事件,然后 VBA 代码触发相应的事件操作。
Private Sub Button1_Released()
DotNetControl1.SetPropertyValue "Text", "This is a button." 'The property type is String
End Sub
Private Sub DotNetControl1_OnEvent(ByVal eventName As String, ByVal eventParametersJson As String)
If eventName = "Click" Then
MsgBox "You click the button."
ElseIf eventName = "TextChanged" Then
MsgBox "You change the button text."
End If
End Sub
提供反馈
对本文档有问题或反馈吗? 请在这里提交您的反馈
Normal