Hi at all,
i've got a problem with starting an external program out of vee, by using
the function execute proram.
Choosing the run style option "minimized" unfortunately has no effect; the
program always starts with maximized window in foreground.
Afterwards i use the CloseProcess-function send to our mailing-list by Shawn
few days ago. This works really fine.
Now my question:
Is there probably a way to minimize the program window via .NET?
Thanks in advance for an answer
Joerg
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
i've got a problem with starting an external program out of vee, by using
the function execute proram.
Choosing the run style option "minimized" unfortunately has no effect; the
program always starts with maximized window in foreground.
Afterwards i use the CloseProcess-function send to our mailing-list by Shawn
few days ago. This works really fine.
Now my question:
Is there probably a way to minimize the program window via .NET?
Thanks in advance for an answer
Joerg
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
That's very interesting, and it probably means that even if you use the
CreateProcess api call or Process.Create .NET call you won't be able to get
it to start minimized (btw, this probably means that the program's author
did not use the standard UpdateWindow(nCmdShow) in his InitInstance. Whether
that was by design or an oversight is the question).
At any rate, if you're telling VEE to wait for the program's exit then
there's not much you can do about it, but if you don't need to wait for exit
you can find the window by it's window title and send it a command to
minimize. You can either use SendKeys Alt-Space n. This would look like
SendKeys("% n"). Use a script control (Set s =
CreateObject("MSScripting.Script"); s.SendKeys("% n"); or use a special
spoofed version of FindWindow:
long _stdcall FindWindowA(int x, char* pName);
h = FindWindow(0, "<window title>"); //title must exactly match
SendMessageA(h, 0x112, 0xF020, 0);
where SendMessageA is:
long _stdcall SendMessageA(long hWnd, int uMsg, long wParam, long lParam);
All these functions are in user32.
-SHAWN-
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".