G
Guest
Hi all,
Lately I have been working on an application in VB .net CF for Pocket PC
device. I have a small question about Context Menu.
When I try to close the window after context menu is poped up, the window
does not closes until I click on the window. Below is the code. Hopefully,
you can help me out.
Friend WithEvents ContextMenu1 As System.Windows.Forms.ContextMenu
-----Remember ContextMenu1 has no menu items added.---------
'Setting context menu for the listview. When user holds the mouse on the
listview item, then context menu pop up event is fired. Look below to see the
code
Me.ListView1.ContextMenu = Me.ContextMenu1
Private Sub ContextMenu1_Popup(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ContextMenu1.Popup
Me.Close() 'The window does not closes. Don't know why
End Sub
Your help will be appreciated
Lately I have been working on an application in VB .net CF for Pocket PC
device. I have a small question about Context Menu.
When I try to close the window after context menu is poped up, the window
does not closes until I click on the window. Below is the code. Hopefully,
you can help me out.
Friend WithEvents ContextMenu1 As System.Windows.Forms.ContextMenu
-----Remember ContextMenu1 has no menu items added.---------
'Setting context menu for the listview. When user holds the mouse on the
listview item, then context menu pop up event is fired. Look below to see the
code
Me.ListView1.ContextMenu = Me.ContextMenu1
Private Sub ContextMenu1_Popup(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ContextMenu1.Popup
Me.Close() 'The window does not closes. Don't know why
End Sub
Your help will be appreciated