Taskbar Buttons Moved to Tray

Jnuw

Member
Joined
Jan 26, 2006
Messages
7
Programming Experience
Beginner
Hello all.

Well I'm new here, and also new to VB.Net. I have been muddling my way through dos batch files, and Nullsoft installer scripts for a couple of years, and now finally am taking my first VB.Net course. Fun stuff...

Anyhow, what I have been looking for for some time now is a way to remove the taskbar button for an open, non-minimized (restore view) program. Instead of the taskbar button, I would like to have a tray icon. So for example, at work I leave Outlook 2003 running, and displayed as a small window (restore view) all day on my second monitor. I would love to not give up space on my taskbar for Outlook, as well as several other programs I keep running and open all day.

Is there a way that I could make a VB.Net program that would come through after these programs open, and move their taskbar buttons to the tray? Or is there a way I could edit Outlook for example, and not let it display a taskbar button, since it uses a tray icon anyways?

Your thoughts are appreciated, thank you very much.

Jnuw
 
I use a utility called PowerMenu that does just that. You could do something similar in VB.NET but it would undoubtedly make heavy use of API functions. Any time you want to influence other running processes that you didn't create there is a very high possibility that it means using APIs.
 
jmcilhinney said:
I use a utility called PowerMenu that does just that. You could do something similar in VB.NET but it would undoubtedly make heavy use of API functions. Any time you want to influence other running processes that you didn't create there is a very high possibility that it means using APIs.
jmcilhinney, thank you so much for the suggestion on PowerMenu. However, correct me if I'm wrong, it only moves the taskbar button/entry to the tray if the program is minimized. I'm looking for a way that will allow me to keep the window open, either maximized or windowed, and only have an icon in the tray (no taskbar button). Make sense?

Unfortunately PowerMenu only seems to move the taskbar button to the tray if the program is minimized. I do like the transparency options though, very cool.

Any other ideas? Are APIs hard to a beginner to use? Thanks again.

Jnuw
 
Yes, you're right. PowerMenu minimises the whole window to the tray. I didn't really read your post properly it would seem. At least PowerMenu proves that it can be done. You'd just have to use many of the same APIs but in not exactly the same way. The problem with the Windows API is that it is not very well documented in that you pretty much have to know what you're looking for. Every method is documented on MSDN but finding the right method if you don't already know what it is can be very difficult. Also, the method signatures are all for C++ so you have to convert that to VB.NET. This is a good site, from which I suggest that you download the API-Guide if you're interested. Also have a look at www.pinvoke.net. Read up in the help/MSDN about the Declare keword and the DllImportAttribute class. They are the two methods of accessing API functions in VB.NET code. Declare is probably easier but it is the old VB6 way. using the DllImportAttribute class is more complex at first but it is more powerful and more "authentic .NET", if you like.
 
jmcilhinney, thanks so much for the input. I'll post back with my findings. May be a bit though, I have a feeling that I have some to learn before I'll be ready for all that. Thanks again.

Jnuw
 
Back
Top