By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,786 Members | 1,131 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,786 IT Pros & Developers. It's quick & easy.

How to show Pop up menu ?

P: n/a
In my VB6 program I have a Grid control, and when I right click on the grid,
I will show a pop up menu.
In VB.NET 2003 how can I show a pop up menu on a control ?

This is the code from VB6
Private Sub TDBGridWorking_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)
If Button = 2 Then
frmDesk.PopupMenu mnuedit
End If
End Sub
Jun 12 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Jun 9, 9:51 am, "fniles" <fni...@pfmail.comwrote:
In my VB6 program I have a Grid control, and when I right click on the grid,
I will show a pop up menu.
In VB.NET 2003 how can I show a pop up menu on a control ?

This is the code from VB6
Private Sub TDBGridWorking_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)
If Button = 2 Then
frmDesk.PopupMenu mnuedit
End If
End Sub
You create a ContextMenuStrip and then set it as the value of the
control's ContextMenuStrip property.

Thanks,

Seth Rowe

Jun 12 '07 #2

P: n/a

"fniles" <fn****@pfmail.comwrote in message
news:eC****************@TK2MSFTNGP04.phx.gbl...
In my VB6 program I have a Grid control, and when I right click on the
grid, I will show a pop up menu.
In VB.NET 2003 how can I show a pop up menu on a control ?

This is the code from VB6
Private Sub TDBGridWorking_MouseDown(Button As Integer, Shift As Integer,
X As Single, Y As Single)
If Button = 2 Then
frmDesk.PopupMenu mnuedit
End If
End Sub

The form as a Context Menu Strip. The other controls have Context Menu as
well.

http://www.codeproject.com/vb/net/ContextMenuVBNET.asp

Anything you're thinking about doing, the Code Project has it, my examples
tool of choice. :)
Jun 12 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.