Click to See Complete Forum and Search --> : Add text to WinForm title bar
to_sam
December 8th, 2008, 11:16 AM
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.
ifdef
December 8th, 2008, 02:34 PM
Do you mean?
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.
rliq
December 9th, 2008, 12:01 AM
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!
HanneSThEGreaT
December 9th, 2008, 04:59 AM
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..
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.