Find the border size of a BorderStyle

A

active

There are at least the following border styles:

None


FixedSingle


Sizable


FixedDialog


FixedToolWindow


SizableToolWindow



SystemInfo gives a border size for Flat and for 3D but not for a give
BorderStyle

Which of the above are Flat and which are 3D?

I want to write a routine that returns the border size of a
BorderStyle.



thanks
 
P

PlatinumBay

active,

I think you are confusing BorderStyle with FormBorderStyle.

FormBorderStyle:
None
FixedSingle
Fixed3D
FixedDialog
Sizable
FixedToolWindow
SizableToolWindow

BorderStyle
None
FixedSingle
Fixed3D

Flat exists within FlatStyle and Border3DStyle, among others.

What kind of control are you working with?

Hope this helps,


Steve
 
A

active

I need a routine that returns the width of the border.

I want to give the routine the control's FormBorderStyle value, and have it
return the border's width.
If I know which FormBorderStyles are flat and which are 3D I can use
SystemInfo to get the size.

So all I need to know is which of the FormBorderStyles you listed are "flat"
and which are "3D"

Thanks
 
S

Stephany Young

Ummmmmmm ...

The ones with 3D in the name are '3D' - the others are 'Flat'.

But ... If you want to know the width of the border for a given window then
it is (Form.Width - Form.ClientSize.Width) \ 2.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top