|
 |
BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6  | This is the forum to discuss the Wrox book Beginning Visual Basic 2005 by Thearon Willis, Bryan Newsome; ISBN: 9780764574016 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
 |
|
|

October 23rd, 2007, 10:05 AM
|
Registered User
|
|
Join Date: Oct 2007
Location: Scarborough, ME, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Favorites Project - Right-Click Event
I have a mystery... Where does the right-click event on the system tray icon get handled? I can't find it. What if I want to detect a click event or mouse hover event on the icon in order to display the context menu? Is this possible?
Great Book. Thank You
|

October 23rd, 2007, 10:13 AM
|
 |
Wrox Author
|
|
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
|
|
See steps 6 and 7 on page 369.
Thearon
|

October 23rd, 2007, 10:59 AM
|
Registered User
|
|
Join Date: Oct 2007
Location: Scarborough, ME, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I see how steps 6 and 7 on page 369 address the MenuItem_Click event, but what about how right-clicking the icon in the system tray gets handled? How does the menu get raised in the first place?
Thanks, Nat
|

October 23rd, 2007, 11:10 AM
|
 |
Wrox Author
|
|
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
|
|
Nat,
My mistake, I thought you did not understand where the steps were.
When you set the ContextMenu property for the NotifyIcon control, the control automatically setups the code internally to the control to respond to a right mouse click.
I hope this answers your question.
Thearon
|

October 24th, 2007, 08:14 AM
|
Registered User
|
|
Join Date: Oct 2007
Location: Scarborough, ME, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thank you. Wow. I did not expect to hear from the author. And so fast. It seems the handling of this event is not modifiable. I was just curious.
Nat
|

October 24th, 2007, 09:49 AM
|
 |
Wrox Author
|
|
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
|
|
Nat,
You can modify the handling of this event by overriding it in code. Add an event handler by selecting icnNotify in the Class Name combo box at the top left of the Code Editor and select the MouseClick event in the Method Name combo box. Then add your code in the event handler.
Thearon
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |