Represents the collection of all event handlers for the Clicked events raised by the Button controls on a form.
Assembly: Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)
The ControlEvents class and its Item property are used to bind event handlers in the InternalStartup method of a form template's FormCode class (in the form template's FormCode.cs or FormCode.vb file)
The InternalStartup method and the event binding code within it are generated by InfoPath when you add event handlers using various user interface commands. You should not create the InternalStartup method or write any additional code within it yourself. For information about how to add event handlers using interface commands, see How to: Add an Event Handler.
public void InternalStartup()
Private Sub InternalStartup(ByVal sender As Object, _
AddHandler DirectCast(EventManager.ControlEvents("MyBtn"), _
ButtonEvent).Clicked, AddressOf MyBtn_Clicked