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.ContextMe nu
-----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.Co ntextMenu = Me.ContextMenu1
Private Sub ContextMenu1_Po pup(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles ContextMenu1.Po pup
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.ContextMe nu
-----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.Co ntextMenu = Me.ContextMenu1
Private Sub ContextMenu1_Po pup(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles ContextMenu1.Po pup
Me.Close() 'The window does not closes. Don't know why
End Sub
Your help will be appreciated
Comment