Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 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
Default 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

  #2 (permalink)  
Old October 23rd, 2007, 10:13 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

See steps 6 and 7 on page 369.

Thearon
  #3 (permalink)  
Old 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
Default

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

  #4 (permalink)  
Old October 23rd, 2007, 11:10 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

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
  #5 (permalink)  
Old 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
Default

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

  #6 (permalink)  
Old October 24th, 2007, 09:49 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

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
Search this Thread:

Advanced Search
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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
click event code mohiddin52 Access VBA 1 February 14th, 2006 01:52 PM
Click event on a subform cesather Access 3 December 14th, 2005 05:41 PM
Click Event dkr72 C# 3 December 8th, 2004 06:23 PM



All times are GMT -4. The time now is 11:58 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.