Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resize method and windowstate
Message
From
11/01/2010 16:50:18
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Resize method and windowstate
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01443332
Message ID:
01443332
Views:
172
Hello,

I have a setting where the form can be maximized or normal windowstate at INIT.
The form is also resizable, and some controls are resized in the RESIZE() event of the form.
The resize event takes the form's width and height into account to resize the controls, but after changing the windowstate in the INIT() to maximized, the width and height properties of the form do not reflect the actual width and height, unless I change the Visible property to .T..

The code is as follows:
* Procedure INIT
THIS.WindowState = 2 &&Maximized
*-- This is necessary to have the resize method work properly:
THIS.Visible = .T.
THIS.Resize()
But I usually don't want to change the form's visible property in the init. Is there are more elegant way to do this?
Christian Isberner
Software Consultant
Next
Reply
Map
View

Click here to load this message in the networking platform