Hello,
I have created a custom control derived from the standard ComboBox class.
In there, on the OnLeave trigger, I need to launch the OnSelectionChangeCommitted trigger that is on the form code.
The problem is that I need to find out if it was a Form closing that triggered the OnLeave of the form. Therefore, not calling the OnSelectionChangeCommitted trigger.
I've tried finding a property that will indicate the form is closing but could not find one.
Here is the code of the custom control OnLeave trigger:
I have created a custom control derived from the standard ComboBox class.
In there, on the OnLeave trigger, I need to launch the OnSelectionChangeCommitted trigger that is on the form code.
The problem is that I need to find out if it was a Form closing that triggered the OnLeave of the form. Therefore, not calling the OnSelectionChangeCommitted trigger.
I've tried finding a property that will indicate the form is closing but could not find one.
Here is the code of the custom control OnLeave trigger:
VB.NET:
Protected Overrides Sub OnLeave(ByVal e As EventArgs)
IF (.......the form is closing)
EXIT THE SUB
ELSE
Me.OnSelectionChangeComitted(e)
End Sub