-
December 8th, 2008, 11:16 AM
#1
Add text to WinForm title bar
I am trying to add a text to the title bar of a Windows Forms. With other words, left to the minimize box in the title bar I want to display a text in italic (NOT the Form.Text property!). I guess I should be using the WM_NCPAINT message in the overridden WndProc. For some reason I cannot get it work. I am using Vista. Does anyone know this? Thanks.
-
December 8th, 2008, 02:34 PM
#2
Re: Add text to WinForm title bar
Do you mean?
Code:
Form1.ActiveForm.Text = "Fish";
You have to referr to the spesific instance of the form object that you have created, in this case form1 and then select the active form's text.
-
December 9th, 2008, 12:01 AM
#3
Re: Add text to WinForm title bar
I think the format of the title area of the form is decided by the user's Display Properties/Appearance setting. Eg, they may be slightly blind and have large fonts chosen etc.. Not sure if it is a 'desired' idea to mess with that on a program by program basis, rather leave it system-wide. But you have me experimenting myself now!
Rob
-
Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......
-
December 9th, 2008, 04:59 AM
#4
Re: Add text to WinForm title bar
I don't think that is at all possible, even with overriding the Paint message. Best would be to create your own window to be used as the titlebar, and just manipulate it accordingly..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|