Diablicolic Posted August 7, 2003 Posted August 7, 2003 When i right-click my form I want a menu to pop up, with menu items like: Copy Paste Cut I probably wouldn't use these commands, but others I would though. So I know I would use the right-click event, but how would I add the menus to that event? Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown If e.Button = MouseButtons.Right Then '??? MsgBox("This works") End If End Sub Quote "Reality is fake, Dreams are for real"
Winston Posted August 7, 2003 Posted August 7, 2003 Add a Context Menu control add your menu items like you do with a standard main menu then on the forms property go to Context Menu and select the Context menu u created Quote
Diablicolic Posted August 7, 2003 Author Posted August 7, 2003 AHAHAHAHAA!!! YEE HAH!! Thank you Winston once again :) Quote "Reality is fake, Dreams are for real"
feurich Posted February 4, 2004 Posted February 4, 2004 Saw this thread and wondered How would you make it that the context menu will only appear when you click in a treeview Control that is on the form?? Cire Quote Trust the Universe
feurich Posted February 4, 2004 Posted February 4, 2004 Stupid Ok it's very easy just asign the context menu to the treeview control duhh Cire Quote Trust the Universe
Administrators PlausiblyDamp Posted February 4, 2004 Administrators Posted February 4, 2004 Set the treeview's contect menu to be the ContextMenu rather than setting the form's context menu. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.