473,327 Members | 2,094 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

HOW TO: Win32 API - Get all windows, draw a icon and bring the windowsto the systray

Hi newsgroup,

What I intend to do:
Write a small programm, that will add a new Button to every Window right
beside the Buttons for minimizing, maximizing and closing the window in
the window's titlebar. When this button is clicked the window itself
should be minimized to the systray

On my way there I found hardly any example via Google that suited my needs.
All I know about already is how to get all windows in VB.Net ( which
actually isn't C#, so I got a bit confused by the different syntax )

I would be thankful for *any* help that could be granted.
Especially on getting all (active ?) windows, drawing a icon onto them
and minimizing them to the systray.
Thx in advance for any help

Christoph
Nov 16 '05 #1
1 4130
Hi,

The most challenging part of your task will be creating buttons on the
windows' title bars. The thing is you'll have to subclass every window in
order to add something to it's title bar. More than that, how about windows
who have custom title bars or even window shapes?

Regarding drawing on a window's toolbar, see my reply to redneon below (the
answer fully applies if the window is a window belonging to your
application, but the idea to handle WM_NC* messages is still valid for
customizing other applications' windows).

As for minimizing to the tray, there's nothing like that in the API - you'll
have to minimize and hide the window and add an icon to the tray manually -
as well as to add handling for clicking on that icon in order to show and
restore the window.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"Christoph Engelhardt" <me***@setiherbipolis.de> wrote in message
news:uw*************@TK2MSFTNGP11.phx.gbl...
Hi newsgroup,

What I intend to do:
Write a small programm, that will add a new Button to every Window right
beside the Buttons for minimizing, maximizing and closing the window in
the window's titlebar. When this button is clicked the window itself
should be minimized to the systray

On my way there I found hardly any example via Google that suited my
needs.
All I know about already is how to get all windows in VB.Net ( which
actually isn't C#, so I got a bit confused by the different syntax )

I would be thankful for *any* help that could be granted.
Especially on getting all (active ?) windows, drawing a icon onto them
and minimizing them to the systray.
Thx in advance for any help

Christoph


Nov 16 '05 #2

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

Similar topics

7
by: Lalit | last post by:
Hi Friends, I have developed a Windows service. Now i need icon for this service in systray and context menu fo this icon. Can i do this? With regards, Lalit
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...
1
by: Fast Eddie | last post by:
Can anyone tell me a good way to make a blinking systray icon? I want it to alternate between two icons. I've tried toggling between two notifyIcons and alternating the visible variable - but that...
5
by: christopher green | last post by:
I am writing a C# windows application but I don't want to display any forms, effectively I want it to be invisible on the desktop apart from an icon in the system tray. How can I do this? I know I...
8
by: Jacek Jurkowski | last post by:
1) How to prevent user to run secound copy of application on the same mahine? I would like to show dialog "Already run" instead of launching a secound insrance. 2) Why, if minimized into a notify...
3
by: Brent Burkart | last post by:
I haven't dived into creating my windows service yet, but after looking around I have not discovered how to make the service icon appear in the lower right hand corner and how to make a menu to...
4
by: Water Cooler v2 | last post by:
I want to run a service at the background but also provide some user interface for editing some configuration options. In this regard, my questions are: 1. Can a Windows Service have a UI along...
6
by: Nathan Laff | last post by:
Why when I inherit a ComboBox and make no code changes, when I set the new control DropDownStyle to dropDownList it appears different than the standard ComboBox control on Vista? In Windows...
7
by: Jassim Rahma | last post by:
did you see the CNN or BBC dekstop news alert software? I want to develop the same but for banner advertisment and I want to if I should do it as system tray ir windows services?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.