By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,219 Members | 2,361 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,219 IT Pros & Developers. It's quick & easy.

Minimize other apps to the systray

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
http://www.codeproject.com/system/Mi...ndowToTray.asp

This seems to be exactly what you want..

--
Rgds,
Anand
VB.NET MVP
http://www.dotnetindia.com
"Yancey Jones" wrote:
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

Nov 21 '05 #2

P: n/a
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.

Nov 21 '05 #3

P: n/a
"=?Utf-8?B?QW5hbmRbTVZQXQ==?=" <An******@discussions.microsoft.com> wrote
in news:C5**********************************@microsof t.com:
http://www.codeproject.com/system/Mi...ndowToTray.asp

This seems to be exactly what you want..

Yes that is exactly it, the only problem is that it is in C++. If I can't
find a VB .NET example I will work on converting this one.

Thanks for the link.

-Yancey
Nov 21 '05 #4

P: n/a
"stand__sure" <st*********@hotmail.com> wrote in
news:11**********************@f14g2000cwb.googlegr oups.com:
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
Nov 21 '05 #5

P: n/a
decorate it with a DllImport attribute and set the security to allow
calls to unmanaged code

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.