For Programmers: Free Programming Magazines  


Home > Archive > C# > August 2004 > WinForm margin borders problem









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author WinForm margin borders problem
RawSteel

2004-08-21, 4:01 pm

Hi. I am trying to implement my user control which inherits
Windows.Forms and I want to make it skinnable. So I use
BorderStyle.None on the form and I will draw the borders and title
bar. But in this case if I add menu it must be offseted from the top
by the height of my skinnable title bar. How can I achieve that.
How I can set som borders of the form where all the controls can be
drawned and the rest I will draw myself( ie the borders and title
bar). I tried to set the DockPadding.Top property to 20 for example
but the menu is not padded. It seems that it is not docked to the top
of the form , but it uses some other way to bound to the top. Can I
make the menu to appear for example 20 pixels padded from the top?

Thanks in advance.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com