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.comsc@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
**********************************************************