Thanks bonnie for the debug suggestion.
I modified my code like this:
-----------------------------------------------------------------------------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
selected = "INIT"
Debug.WriteLine(selected + " before")
cm.Show(TextBox1, New Point(0, 0))
Debug.WriteLine(selected + " after")
End Sub
Private Sub mnuHandler(ByVal sender As Object, ByVal e As System.EventArgs)
selected = CType(sender, MenuItem).Text
Debug.WriteLine(selected + " inside")
End Sub
-----------------------------------------------------------------------------
This is the Debug output if I select "Text2"
INIT before
INIT after
Text2 inside
Is there a way to make the Debug output like this?
INIT before
Text2 inside
Text2 after
OMAR C. IBRAHIM
----------
Programmer
STUDENT RECORDS & INFORMATION SYSTEM (SRIS)
Western Mindanao State University, Philippines
----------
Programmer
SSI Engineering & Architectural Designs and IT Center (SENARD ITC)
Zamboanga City, Philippines