示例:事件
在该示例中,在
事件
选项卡上选择的是 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" ThenMsgBox "You click the button."
ElseIf eventName = "TextChanged" ThenMsgBox "You change the button text."
End If
End Sub
提供反馈