Protected Overrides Sub OnClick() Dim myForm As frmWindowsForm If myForm Is Nothing Then myForm = New frmWindowsForm End If If myForm.Visible Then myForm.Hide() Else myForm.Show() End If myForm = Nothing End Sub
Dim myForm As frmWindowsForm [in class constructor, set this] myForm = Nothing Protected Overrides Sub OnClick() If myForm Is Nothing Then myForm = New frmWindowsForm End If If myForm.Visible Then myForm.Hide() Else myForm.Show() End If End Sub
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.