Minimize other apps to the systray

Y

Yancey Jones

I am looking for some example code for minimizing a 3rd part app to the
system tray. I am working on writing a service to control VMWare and when a
user logs in, I would like to minimize the VMWare window(s) to the system
tray and hide it from the task bar (and of course un-hide the VMWare
windows should the user choose to do so from the system tray).

I have been searching but havent found anything yet. I am guessing that it
is possible??

Thanks,
Yancey
 
S

stand__sure

if memory serves, you can use the ShowWindow function from user32.dll

ShowWindow(hWnd,SW_MINIMIZE);

you'll probably use FindWindowEx to get the handle (HWND) for the other
window.
 
Y

Yancey Jones

if memory serves, you can use the ShowWindow function from user32.dll

ShowWindow(hWnd,SW_MINIMIZE);

you'll probably use FindWindowEx to get the handle (HWND) for the other
window.

Getting the handle should not be a problem especially since the service
will be spawing the VMWare session.

Thanks,
Yancey
 
S

stand__sure

decorate it with a DllImport attribute and set the security to allow
calls to unmanaged code
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top