473,473 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Minimize other apps to the systray

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
5 1767
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
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
"=?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
"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
decorate it with a DllImport attribute and set the security to allow
calls to unmanaged code

Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Action | last post by:
I can add a systray icon in normal windows application... but when i do it in windows service, the systray icon just don't show up is that because i don't have any "component" to contain the...
3
by: Jon Bosker | last post by:
I have written an application that lives in the systray but when I try to close windows or logout it does not close my application and therefore prevents windows from shutting down or logging me...
3
by: Maka Sili | last post by:
Hi, My VC++ application does not have a titlebar (and therefore no System menu, no minimize, no maximize and no close button). We have a custom button for minimize and close. When the app...
0
by: kapcreations | last post by:
I have a system tray app which gets the status of a windows service, and displays the appropriate icon for the status of the service in the systray. the problem I am having is the icon disapears...
3
by: Don | last post by:
If you have a form that calls another form via the following code: Dim myForm as Form2 myForm = New Form2 myForm.Owner = Me MyForm.ShowDialog and you minimize the second form, the first form...
8
by: Rob R. Ainscough | last post by:
I have a VS 2005 Windows Service with a Installer project as part of my solution. The Service installs fine but I can't seem to make either of these work: 1. Have the service start after...
3
by: Jimmy | last post by:
I'm kinda newbie to python and wxPython. Now I'm confronting a thorny problem: how can I make my program minimize to the taskbar represented as an ico, and when there is some message from network...
1
by: Pia Stevens | last post by:
A program opened at start a console window. How can I automatically minimized this window to Systray (not Taskbar)? Pia
5
by: =?Utf-8?B?SmFtZXMgV29uZw==?= | last post by:
Dear all, I'd like to know if there is any method to minimize command mode window when a console program is running. In my case, there are several console programs which run periodically in...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.