all groups > vb.net controls > july 2004 >
You're in the

vb.net controls

group:

Border widths and colours



Border widths and colours Vilem Sova
7/16/2004 10:40:26 AM
vb.net controls: I'm an Access programmer in the process of converting an Access application
to VB.Net.

In Access you can set border widths and colours on virtually all controls,
but this doesn't seem to be the case in .Net. All you've got (it seems) is
thin black borders. This is a pretty major restriction on screen design. The
application I'm working on uses mostly dark colours for form backgrounds
with bright light-coloured borders on some controls for contrast (especially
for grouping controls together). Black thin borders just don't work on dark
backgrounds. Am I able to keep the look I want with .Net?

Thanks,
Vilem Sova
Canberra, Australia

Re: Border widths and colours Herfried K. Wagner [MVP]
7/17/2004 3:01:30 AM
Vilem,

* Vilem Sova <vilem.sova@parkman.com.au> scripsit:
[quoted text, click to view]

As you have already found out, that's not directly supported for Windows
Forms controls. Notice that Access has always been an exception and
normal applications written in Visual Basic or C++ never provided this
options for changing the borders like in Access.

You /can/ add borders to controls by deriving a class from the control
and overriding its 'OnPaint' method to add the border, but that's a lot
of effort and there is no guarantee that this will work with all
controls properly.

Conclusion:

I would try to avoid non-standard colors and borders in the user
interface and use the predefined colors and borders.

--
Herfried K. Wagner [MVP]
AddThis Social Bookmark Button