Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windowstate property and bogus height/width values
Message
From
21/01/2000 14:50:49
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Windowstate property and bogus height/width values
Miscellaneous
Thread ID:
00321093
Message ID:
00321093
Views:
66
Can anyone clarify something for me. I have been attempting some form resizing code which in turn resizes a container within the form, but am having problems when setting the windowstate prop of the form to 2. Here is the code in the two events:

Forms INIT method:

THISFORM.VISIBLE = .F.
THISFORM.WINDOWSTATE = 2
THISFORM.RESIZE()

*- Test code
*!*WAIT WINDOW "THE FORMS HEIGHT IS: " + STR(THIS.HEIGHT) + CHR(13) +;
*!*"THE CONTAINER'S HEIGHT IS: " + STR(THIS.CONTAINER1.HEIGHT)

*!*WAIT WINDOW "THE FORMS WIDTH IS: " + STR(THIS.WIDTH) + CHR(13) +;
*!*"THE CONTAINER'S WIDTH IS: " + STR(THIS.CONTAINER1.WIDTH)

THISFORM.VISIBLE = .T.


Forms RESIZE event:

THIS.CONTAINER1.WIDTH = THISFORM.WIDTH
THIS.CONTAINER1.HEIGHT = THISFORM.HEIGHT
THIS.CONTAINER1.REFRESH()
THISFORM.REFRESH()


The problem I'm running into is that it seems the form's HEIGHT and WIDTH properties dont' get updated until the form's VISIBLE = .T., so even though I can check the form's WINDOWSTATE property and it reads 2-Maximized, it hasn't really been resized until it becomes visible?

Can anyone confirm that this is what happens?


Thanks

sc
Sean Campbell
www.upstagesoftware.com
sc@upstagesoftware.com

**********************************************************
Eddie, I wouldn't be anymore surprised, if tomorrow I woke up with my face stapled to the living room carpet.

Clark W. Griswold
**********************************************************
Next
Reply
Map
View

Click here to load this message in the networking platform