Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Call the system tray menu of VB program by another VB program

Posted on 2003-02-23
9
Medium Priority
?
361 Views
Last Modified: 2010-05-01
Hello,

I want to call a system tray menu of a VB program by another program... Is this possible?? Emulate de mouse click by another program??

Please help me.
 Le(Ge)²
0
Comment
Question by:legege84
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 1

Expert Comment

by:SilentRage
ID: 8004490
Sure it's possible.  There's all kinds of techniques that may be used to emulate mouse events, or execute macro-like behavior.

However, as for the system tray menu, those function can be called without messing with mouse events.  What is it that you are wanting to do?
0
 

Author Comment

by:legege84
ID: 8004529
Yes it's this! When I'll execute a VB exe, it will open the menu of an application in the systray.

Do you have a code to do that??
0
 
LVL 1

Expert Comment

by:SilentRage
ID: 8004648
I'm still not clear on what you're trying to do.  I think maybe you should try to use more than 1 line to describe what you want.  Here, I'll give you some questions to help you out with explaining.

ok, you execute a VB program YOU wrote?
Then this VB program that YOU wrote, and execute, will open the menu of ?what? application in the ?what? tray?  You mean the tray icons?  those things by the clock on your taskbar?  You want to raise the popup menu of a icon in the trayicon list?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:legege84
ID: 8004691
Ok... scuse me! (I speak french)

I wrote VB program and this program is in the tray icons of Windows (juste beside the clock). This program show a popup menu when I click on her icon with the left mouse button. But I want to show this popup menu by executing another exe.

Is it ok?
0
 
LVL 1

Accepted Solution

by:
SilentRage earned 400 total points
ID: 8004706
The best way to do this is for the VB program that is in the icon tray to detect the other program that was executed.  When it detects this other program, it will popup it's own menu.  Is this acceptable?  or do you still want the exe you execute to raise up the VB menu for it.
0
 

Author Comment

by:legege84
ID: 8004739
Ok... I could be a solution, but there isn't way to raise mouve event by another exe?... If no, have you a piece of code for detecting an application...

Thanks
0
 

Author Comment

by:legege84
ID: 8005241
I had do that, and it works perfecly, thanks for your idea!
0
 
LVL 1

Expert Comment

by:Bandy
ID: 8005423
If you want to raise the event from another application, rather than detecting when the other application starts up, you could use the "postmessage" api from the calling application, and trap window messages in the tray application, and pop up the menu when you detect the message you want. If you want an example, let me know, I have a working example, it's too long to put up here, but I'll email it to you if you would like.
0
 

Author Comment

by:legege84
ID: 8005459
Oh, it could be cool! You can send it to legege84+/+at+/+hotmail_dot_com
(for spam control... replace +/+at+/++ by @ and _dot_ by .)
Thanks!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question