473,545 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
+ 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 1771
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?QW5hbmRbTVZ QXQ==?=" <An******@discu ssions.microsof t.com> wrote
in news:C5******** *************** ***********@mic rosoft.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__sur e" <st*********@ho tmail.com> wrote in
news:11******** **************@ f14g2000cwb.goo glegroups.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
9906
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 systray icon? please give direction... thx
3
5485
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 out. It is essential that I solve this problem but I have run out of ideas can anyone help (please!) The application starts in Start.cs which kicks...
3
4955
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 is in normal/maximized view, clickinng on the taskbar entry does not minimize the application. Normally (with apps with titlebar), the application...
0
1818
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 under certain conditions, but the exe is still listed in the processes leading me to believe the app is still running. It fires up perfectly on...
3
5419
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 remains visible (albeit completely disabled).
8
2646
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 install 2. Have the service interact with the SysTray In my ProjectInstaller.vb Private Sub ServiceInstaller1_AfterInstall(ByVal sender As
3
14273
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 coming, it will pop out?
1
2384
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
10763
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 server. Now, every console program instance will open a command mode window and they occupy the whole screen. I want to minimize all of them and...
0
7661
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7433
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5976
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5340
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4949
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3458
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1891
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 we have to send another system
1
1020
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
712
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.