Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.Width property - includes border ??
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00214601
Message ID:
00214791
Views:
21
>Does the width property account for the border width? if I have an object with a .width = 10 and borderwidth = 1, is the total screen space taken by the object equal to 10 or 12?
>
>Thanks,

Hi Marcus,

As Ed pointed out the width doesn't include the border. Further, the height doesn't include it nor the title bar. If you need to get the actuals there are two ways. One, uses the API, the other (far simpler IMHO) uses Foxtools. Try this:
STORE 0 TO nTop, nLeft, nBottom, nRight
* Get the window handle from Foxtools
* lccaption is the form's caption
* lnhWnd is the window handle
lnhWnd = _WhTohWnd(_WFindTitl(lccaption))
= _GetWRect(lnHwnd, @nTop, @nLeft, @nBottom, @nRight)
The values returned in the various variables include the width and height of the title bar, border, etc.

hth,
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform