picture box display context menu
picture box display context menu
picture box display context menu
picture box display context menu
picture box display context menu
picture box display context menu picture box display context menu picture box display context menu picture box display context menu picture box display context menu picture box display context menu picture box display context menu picture box display context menu
picture box display context menu picture box display context menu
picture box display context menu
Go Back  Xtreme Visual Basic Talk > > > picture box display context menu


Reply
 
Thread Tools Display Modes
  #1  
Old 01-25-2004, 05:11 AM
SpiN9823's Avatar
SpiN9823 SpiN9823 is offline
Centurion
 
Join Date: Jan 2004
Location: New Jersey
Posts: 126
Default picture box display context menu


how do i make a picture display a context menu on left click? ive been tryin to figure this out for awhile but nuttin i try seeems to work!!
thx
__________________
SpiN
Reply With Quote
  #2  
Old 01-26-2004, 07:39 AM
Machaira's Avatar
Machairapicture box display context menu Machaira is offline
Jedi Coder

* Expert *
 
Join Date: Aug 2002
Location: Abingdon, MD
Posts: 3,438
Default

Usually a context menu is associated with a right click. Steps:

1) Create the context menu using the ContextMenu control in the Toolbox.
2) Set the ContextMenu property of the PictureBox to the control you just created.
Reply With Quote
  #3  
Old 01-27-2004, 04:20 PM
SpiN9823's Avatar
SpiN9823 SpiN9823 is offline
Centurion
 
Join Date: Jan 2004
Location: New Jersey
Posts: 126
Default

i tried that before i posted this but you have to right click it... is there a way to make it left click?
__________________
SpiN
Reply With Quote
  #4  
Old 01-27-2004, 06:54 PM
VBJoe's Avatar
VBJoepicture box display context menu VBJoe is offline
Village VB Idiot

* Expert *
 
Join Date: Jan 2003
Location: Idaho
Posts: 1,850
Default

I wouldn't suggest you open a context menu with a left click, things like that make users mad. But if you insist:
Code:
Private Sub txtOutput_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtOutput.Click Dim p As System.Drawing.Point p.X = 100 p.Y = 100 ContextMenu1.Show(txtOutput, p) End Sub
I don't mind helping you, but I need to know: have you actually read a book on .NET? Have you any previous programming experience? I ask because the Click event has been around for a long time...
Reply With Quote
  #5  
Old 02-05-2004, 03:31 PM
SpiN9823's Avatar
SpiN9823 SpiN9823 is offline
Centurion
 
Join Date: Jan 2004
Location: New Jersey
Posts: 126
Default

yes i have read a book about VB.NET... and yes i have programming experience
__________________
SpiN
Reply With Quote
  #6  
Old 02-06-2004, 06:11 AM
Machaira's Avatar
Machairapicture box display context menu Machaira is offline
Jedi Coder

* Expert *
 
Join Date: Aug 2002
Location: Abingdon, MD
Posts: 3,438
Default

You might want to think about reading a book on GUI design. As VBJoe says, a left click should almost never be used to display a context menu. I believe it's ICQ that does this and it ticks me off.
Reply With Quote
  #7  
Old 02-08-2004, 06:17 AM
SpiN9823's Avatar
SpiN9823 SpiN9823 is offline
Centurion
 
Join Date: Jan 2004
Location: New Jersey
Posts: 126
Default

thanks machaira and vbjoe
__________________
SpiN
Reply With Quote
  #8  
Old 03-01-2004, 01:25 PM
KEITHSTER KEITHSTER is offline
Newcomer
 
Join Date: Mar 2004
Posts: 1
Default

Quote:
Originally Posted by SpiN9823
how do i make a picture display a context menu on left click? ive been tryin to figure this out for awhile but nuttin i try seeems to work!!
thx



add a context menu control to project named contextmenu1 ( you must add menu items ( ie words describing menus ).. if you don't, the contextmenu will not popup.


basically this....

sub picturebox1_click

if picturebox1.mousebutton = mousebuttons.left then

picturebox1.contextmenu = contextmenu1

end if

end sub

hope this helps.
Reply With Quote
  #9  
Old 03-01-2004, 01:55 PM
SpiN9823's Avatar
SpiN9823 SpiN9823 is offline
Centurion
 
Join Date: Jan 2004
Location: New Jersey
Posts: 126
Default

Yes, that did help, thanks.
__________________
SpiN
Reply With Quote
  #10  
Old 03-01-2004, 05:08 PM
SpiN9823's Avatar
SpiN9823 SpiN9823 is offline
Centurion
 
Join Date: Jan 2004
Location: New Jersey
Posts: 126
Default

And VBJoe and Machaira, I'm making the PictureBoxes look like a menu because the images look better, but thanks anyway.
__________________
SpiN
Reply With Quote
  #11  
Old 03-14-2004, 08:40 AM
greg85374 greg85374 is offline
Junior Contributor
 
Join Date: Jan 2004
Location: NY
Posts: 309
Default Ie context menu

Hey ive looked for 3 days no for the code in vb..to simply add an item to the webbrowser right click menu...similar to what he's doing..can anyone help me there?..this is the 3rd forum ive posted this in..still no response..I want to simply add the option "Open in new tab" to the context menu...?plz HELP!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Context Menu hskohli API 8 11-18-2003 09:09 AM
Select item in context menu of another application hskohli API 0 11-12-2003 07:36 PM
VB5 Listbox & Popup Menu alehawk General 3 07-08-2003 02:19 PM
Few Questions dealing with pictures crazycheetah General 21 06-17-2002 11:08 PM
VB Menus John General 8 02-05-2002 09:31 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
picture box display context menu
picture box display context menu
picture box display context menu picture box display context menu
picture box display context menu
picture box display context menu
picture box display context menu picture box display context menu picture box display context menu picture box display context menu picture box display context menu picture box display context menu picture box display context menu
picture box display context menu
picture box display context menu
 
picture box display context menu
picture box display context menu
 
-->