Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SendMessage?

Status
Not open for further replies.

ramien

Programmer
Dec 1, 2005
3
US
I know you can bring up the start menu with
SendMessage hwnd, WM_SYSCOMMAND, ByVal SC_TASKLIST, ByVal 0&
But what I would like to do is bring up the Programs Menu.
Any thoughts?
 
Do you mean the start menu with programs already selected?

Or perhaps you want to show a new window opent to the programs folder?
 
Sheco;
When you click on the Start button, you get the start menu. If move the mouse to the All Programs, you get all the programs listed.
How do I do that?
I've tried every web site I can think, Google searches, FreeVBCode.com, you name it, I've probably been there.
No luck yet.
I don't hold out a lot of hope. But maybe, just maybe, you'll be the man.

PS. Do you know how to move the Run Dialog when it comes up, programatically of couse. I'd like it to move to near where I clicked on my menu.
TIA
Marshall
 
It seems that the only way is to use sendkeys (i.e. SendKeys "P", True) after invoking the Start menu. But you'll have to know the menu structure. Because there can be more menu items with the same letter as shortcut and the menu may differ depending on the locale.


 
Herman;
I've thought about Sendkeys, but never did it. I'll try that right now.
IT WORKS!!!

here's the code.
In Declarations
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)


Subroutine
SendMessage hwnd, WM_SYSCOMMAND, ByVal SC_TASKLIST, ByVal 0&
Sleep 500
SendKeys "P", True
SendKeys "{ENTER}", True

You the man.
Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top