473,320 Members | 2,080 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,320 software developers and data experts.

add icon to nonclient area

I'm sure there's been loads of posts (and answers) as to "how do I add a
system tray icon", but how can I add the sort of minimize button that looks
slightly different and sits alongside the existing minimize button, that is
(fairly obviously) intended to send the app to the system tray, whereas the
normal minimize icon just minimizes it. If you want an example, emule has got
one.

How can I do this in C#?

Nov 16 '05 #1
1 1433
Bonj,

You would have to override the handler for the WM_NCPAINT message in
your application by overriding the WndProc method. When handling it, you
would call the base class implementation (so that the client frame is
drawn), and then paint the button. You would also have to handle other
things as well, such as when the button is clicked, moved over, etc, etc.
To get these events, check out the WM_NC* messages, as they will handle the
events in that area.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Bonj" <Bo**@discussions.microsoft.com> wrote in message
news:42**********************************@microsof t.com...
I'm sure there's been loads of posts (and answers) as to "how do I add a
system tray icon", but how can I add the sort of minimize button that
looks
slightly different and sits alongside the existing minimize button, that
is
(fairly obviously) intended to send the app to the system tray, whereas
the
normal minimize icon just minimizes it. If you want an example, emule has
got
one.

How can I do this in C#?

Nov 16 '05 #2

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

Similar topics

7
by: MightyKitten | last post by:
L.S I'm not sure who I should contact, but it seems the valid-html401 icon is missing at http://www.w3.org/Icons/valid-html401 --
8
by: Ed Isenberg | last post by:
I notice that a lot of Web pages have an icon that is displayed preceding the URL in the place in the browser where the URL is displayed. When I bookmark or add this to Favorites the icon is also...
4
by: Jacob | last post by:
What's the best way to put an Icon in the client area of a form (not in the ControlBox)? Everything I've tried seems to produce unsatisfactory results. A picture box doesn't give me the icon size I...
5
by: yxq | last post by:
Hello The icons with the alpha channel are supported in WindowsXP. If use the System.Drawing.Bitmap.ToBitmap on the icon handle(ico.ToBitmap), the alpha channel won't be preserved, resulting in an...
2
by: Randall Powell | last post by:
I am in the process of developing a Windows Service which will: (1) monitor multiple network shares; (2) marshal text file transfers into an SQL Server 2000 instance; and (3) provide messaging...
2
by: Mamatha | last post by:
Hi I want to add an icon to the textbox's text. I don't know how to display icon in textbox in VB.NET. If any one knows please let me know. Thanks in advance. Mamatha
7
by: Benny Raymond | last post by:
I searched for a couple hours lastnight on example code of how to go about making an item in the System Tray (notification area) not be square. I've found several programs that do this but I can't...
7
by: ozzy66 | last post by:
Heya NG, I've got a little confusing configuration scenario: I've created a simple windows form in c# with Visual Studio 2003.NET and simultaneously with VS 2005. I've designed an Icon as...
5
by: Stanimir Stamenkov | last post by:
I'm trying to style an icon "hanging" below the first line of a heading and I've found interesting difference between Mozilla and the other browsers I'm trying with - Safari 3.1.1, Opera 9.27 and...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
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.