|
-
Jul 4th, 2008, 05:11 AM
#1
Thread Starter
Member
[2.0] Context Menu Strip
Hello,
I have a panel with a few images drawn to it. There are areas with images, and areas without images. Now what I want to do is show a different Context Menu Strip depending on if the user right-clicks on an image, or right-clicks on an area without an image.
What would be the best way to do this?
Thanks.
-
Jul 4th, 2008, 07:18 AM
#2
Hyperactive Member
Re: [2.0] Context Menu Strip
Try adding the images to the panel with a picture box. Then you could add context menu 1 to the picture box, and context menu 2 to the panel.
Jennifer.
-
Jul 10th, 2008, 03:48 AM
#3
Re: [2.0] Context Menu Strip
Handle the MouseClick event, test the e.Button property and the e.Location property. If the right button was clicked then you can call Show on the appropriate ContextMenuStrip for the location of the click. Do NOT set the ContextMenuStrip property of the Panel.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|