|
-
Sep 8th, 2000, 08:11 AM
#1
Thread Starter
Lively Member
Hello All,
I am trying to send a Windows Message from my VB program to an existing program and I am having problems getting this to work:
In the "APP" program, there is a menu option that when pressed displays a message box. What I would like to do is simulate the slection of that menu option from an external program.
Using that Spy++ program that comes with Visual Studio I think that I trapped the message to being:
(P) WM_COMMAND wNotifyCode:0 (sent from a menu) wID:20007 [wParam:00004E27 lParam:00000000]
Now, in my VB Code I did the following:
hParent = FindWindow(CLng(0), "APP")
bBool = PostMessage(hParent, WM_COMMAND, &H4E27, &H0)
It returns with a value of TRUE but nothing happens, even when I monitor the messages with Spy++ nothing shows up.
If I use the SendMessage API:
SendMessage(hParent, WM_COMMAND, &H4E27, &H0)
Nothing happens, but I get the following in Spy++ everytime I Send The Message
(S) WM_NULL wParam:0012F4EE lParam:0012F4EC
(P) WM_NULL lResult:00000000
Does anyone know how to do this kind of thing?
Thanks!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|