|
-
April 14th, 2006, 07:08 AM
#1
Customizing form border
The form border color is currently blue in color. But there seem no way to change its color.
Is there a way to change its color?
Is there a way to customize the border without using FormBorderStyle. Form Border Style seems to change the form border, to make it more 3D or less 3 D only. But I wanted to change it drastically, make the border look extremely different....i hope u know wat i mean.
-
April 14th, 2006, 09:32 AM
#2
Re: Customizing form border
Hi,
Yes there is.You will have to override you Window procedure method :
Code:
protected override void WndProc(ref Message m)
{
if(m.Msg == 0x0085) //msg id for WM_NCPAINT
{
//do your drawing
return;
}
base.WndProc(ref m);
}
You will have to pay attention WM_NCCALCSIZE to calculate the size and postion on non client area.
-
April 15th, 2006, 07:02 AM
#3
Re: Customizing form border
 Originally Posted by hanct
The form border color is currently blue in color. But there seem no way to change its color.
Is there a way to change its color?
Since the colour is determined by the OS theme, the simplest way is to select a different theme on your PC! 
 Originally Posted by hanct
Is there a way to customize the border without using FormBorderStyle. Form Border Style seems to change the form border, to make it more 3D or less 3 D only. But I wanted to change it drastically, make the border look extremely different....i hope u know wat i mean.
If you want to change it "drastically", then the easiest solution *is* to use FormBorderStyle.None and draw everything yourself.
Useful? Then click on (Rate This Post) at the top of this post.
-
April 15th, 2006, 09:29 AM
#4
Re: Customizing form border
Thanks for both reply. Think I try to override the window procedure..though i not sure what code to write in the overriding procedure to change the border color (I will search internet for tat)
I cannot change the theme for my PC....cos creating application is for other people to use...not for myself to use...i cannot expect users to change theme.
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
|