Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > API > Receiving Messages from an app in the system tray. Help!!


Reply
 
Thread Tools Display Modes
  #1  
Old 10-15-2004, 04:34 PM
soloman675 soloman675 is offline
Newcomer
 
Join Date: Aug 2004
Posts: 8
Default Receiving Messages from an app in the system tray. Help!!


I have found a way to have a program send another porgram into the system tray. I now want to figure out a way to get it out of the system tray. Is there anyway to trap any of the messages that will be sent when someone double clicks on this icon? Is there way way to get the name of the icon/window/app when my mouse moves over it? Any help would be so greatly appreicated.
Reply With Quote
  #2  
Old 10-18-2004, 04:38 AM
robertdeniro robertdeniro is offline
Junior Contributor
 
Join Date: Feb 2003
Location: Durban, South Africa
Posts: 306
Default

That would probably require that you subclass the other apps window - not a very clever thing to do. It can be done, but it's unstable because the guys who wrote that app didn't plan for it.

Are you trying to do something like send Word or Excel to the system tray, so it's easily accessible?
In that case you don't need to send the original app. Start the other app hidden, but hold onto its window handle/process ID/or whatever you need to reactivate it.

Then send you own icon into the system tray, and whenever the user click it, reactivate the hidden app.
You don't have to actually send the original app into the system tray - just give the user the impression that things are working that way.
Reply With Quote
  #3  
Old 10-18-2004, 07:45 AM
soloman675 soloman675 is offline
Newcomer
 
Join Date: Aug 2004
Posts: 8
Default

Quote:
Originally Posted by robertdeniro
That would probably require that you subclass the other apps window - not a very clever thing to do. It can be done, but it's unstable because the guys who wrote that app didn't plan for it.

Are you trying to do something like send Word or Excel to the system tray, so it's easily accessible?
In that case you don't need to send the original app. Start the other app hidden, but hold onto its window handle/process ID/or whatever you need to reactivate it.

Then send you own icon into the system tray, and whenever the user click it, reactivate the hidden app.
You don't have to actually send the original app into the system tray - just give the user the impression that things are working that way.

How could I subclass the other apps window??
Reply With Quote
  #4  
Old 10-18-2004, 08:52 AM
Trivium's Avatar
Trivium Trivium is offline
Junior Contributor
 
Join Date: Jul 2003
Location: Arkansas
Posts: 299
Default

Check the knowledge library on this forum. John wrote a very informative tutorial on subclassing as a problem solving solution. But I think *coughs* robertdinero's solution would actually be a better one, and one I wouldn't have thought of myself.

Also, recommended reading:
Subclassing and Hooking with Visual Basic
Stephen Teilhet
O'Reilly Press 2001
__________________
The logic does not compute; So I debug it; A new program is created;
-/Haiku by a programmer\-

Last edited by Trivium; 10-18-2004 at 08:52 AM. Reason: Mispelled authors name. Dangit.
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

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
 
 
-->