473,748 Members | 2,426 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to change the color of a app's title bar?

Hello,

How do I change the color of the app's title bar (where you have the Close,
Minimize and Maximize buttons) in C#?

Mateusz
Dec 20 '05 #1
2 2972
Mateusz,

You could go and change the colors system-wide, but I don't think that's
what you want to do. To do it for an individual window, you will have to
custom paint the frame.

What you want to do is on the Form class, override the WndProc method,
and then handle the WM_NCPAINT message. This will notify you when the frame
needs to be redrawn. Then, you have to do it yourself, from scratch.

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

"Mateusz Rajca" <Ma**********@d iscussions.micr osoft.com> wrote in message
news:68******** *************** ***********@mic rosoft.com...
Hello,

How do I change the color of the app's title bar (where you have the
Close,
Minimize and Maximize buttons) in C#?

Mateusz

Dec 20 '05 #2
Another way to handle it would be to completely remove the titlebar and
to create your own titlebar that is docked to the top. It's a bit of
work, but then you have complete control of the design.

Dec 21 '05 #3

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

Similar topics

1
2426
by: Austin | last post by:
.................. self.diskList = self.cB = wxComboBox(self,-1,wxDefaultPosition,wxDefaultSize,self.diskList) .................. The code is executed initially. If i want to update only the diskList, what could i do?
1
4198
by: w.p. | last post by:
Hello! I want change default tab traversing in my app. But i don't know how to do it :( Belowe i include simple example - i want change default tab order: radiobutton "mode11" -> radiobutton "mode31" -> button OK I can't find any option, flag, or another way.
3
453
by: Mike | last post by:
How do I change the background color of the title bar in a Win Forms .Net app without changing the color settings for all windows in the OS? Thanks.
4
18476
by: Richard Trahan | last post by:
(This is a repost -- the original got tucked away into an old thread because I used the same Subject name.) I'm trying to change the document title to add an asterisk when the document becomes "dirty", as seen on editor applications. I use the code below. Venkman shows that everything looks as expected. The last line is for the debugger, which indicates that the title is changed, but it does not display.
1
1504
by: wolftor | last post by:
Using Access 97, tools, startup, application title. When I change title, it take effect while my app is running. If I close app and reload app, the title change is gone ie. the title remains the same as it was before the change was made. Any ideas how to fix this? -- Regards, Peter www.AAAdataSystems.com
4
2971
by: ACaunter | last post by:
Hi there, I was wondering if there was a way to change the font color of the text in the title bar... by default the title bar is that dark blue faiding into light blue and it has white text... is it possible to change the color of that blue bar and also the color of the text, for all the people who visit the asp.net website... really i want to have the text all to be whatever color, even white, but then 1 character half way through the...
4
4131
by: Eric | last post by:
Hello, I am having some sort of security issue with my code. When I change a file's title in a Windows or console app, I have no problems. (I am using Microsoft's article & DsoFile.dll: http://support.microsoft.com/default.aspx?scid=kb;en-us;224351) When I run it in ASP.NET, I get a "file not found" exception, even though the file does exist.
10
6101
by: IchBin | last post by:
I am trying to set the state of a radio button. I do not see what I am doing wrong. Sorry, I am new at this.. I need another set of eyes to look at this snip of code. I am trying to set the radio button with this link of code: echo 'SCRIPT language=JavaScript setCheckedValue("'.$_SESSION.'");</SCRIPT>'; //? <snip of code>
1
1879
by: kenneth6 | last post by:
I have created a MFC app project in MSVC++ 2005. When I created the project, the project name I chose was "abc", so now the program title is called untitled - abc. However, now I want to change my mind to change the title of the program to "def". 1. How can I change the program title without the need to rebuild another new project? Also, the MFC project I created has no HTML help support. 2. How can I add this help function without the...
0
8984
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9530
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9312
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9238
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8237
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6793
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2206
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.