Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / March 2006

Tip: Looking for answers? Try searching our database.

Add Icon to Titlebar (right side)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rob - 14 Mar 2006 18:38 GMT
I would like to add an icon to the RIGHT side of an application's
titlebar. Basically, it will supplement the other icons already there.
Is there any direct support in .NET 2.0 to do this? If not I assume I
would have to subclass the windows form but what exactly would I do
there?

Also how can a make sure that the icon keeps the same style as the
other icons? Ideally, there would be some "empty" icon (for instance a
minimize icon without the minimize sign) and then I could simply draw
on this icon or merge it with another icon that has transparancy for
the background.

Thanks
Nicholas Paldino [.NET/C# MVP] - 14 Mar 2006 18:57 GMT
Rob,

   No, there is no support to do this.  You would have to override the
WndProc method of your class and handle the WM_NCPAINT message, which is
sent to paint the frame of the form.

   As for getting the default button, that's going to be hard.  You could
use the visual styles api, but it doesn't have anything for an "empty"
button.  Rather, you can paint a different button (max, min, etc, etc), and
then just paint inside of it.

   Hope this helps.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

>I would like to add an icon to the RIGHT side of an application's
> titlebar. Basically, it will supplement the other icons already there.
[quoted text clipped - 9 lines]
>
> Thanks

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.