Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resize class doesn't seem to work with Maximized form!
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00958223
Message ID:
00958260
Views:
20
This message has been marked as a message which has helped to the initial question of the thread.
You might try these as the last 2 lines in init
thisform.show
this.ntmResizer._AdjustControls(this)
but this might show it resizing the controls which may be undesirable.

You could also set height and width properties in the init using sysmetric()


>The problem I see here is that during Init, the form size (height and width) reflect the design time height and width NOT the maximized height & width.
>
>_AdjustControls() has to determine the amount the form has grown. The Maximize doesn't seem to actually take place until AFTER Init has finished. This means that _AdjustControls() won't work in Init because the form hasn't actually grown any at that time.
>
>>>I created a class based mostly on the resizer in Marcia's '1001 Things ...' book. I've created a form class that has this resizer class on it (design time). The form's Resize event has the code:
>>>
>>>this.ntmResizer._AdjustControls(this)
>>>
>>>
>>>The form class also has the WindowState property set to 2 - Maximized. For some reason, the controls never get adjusted when the screen is initially displayed.
>>>
>>>Once the form is displayed and I resize the form, controls grow and shrink appropriately. It's almost as if the Resize() event never gets called when the form initially maximizes.
>>>
>>>Any ideas on why this might be or what can be done to get the form to call resize when it Maximizes the window initially?
>>>
>>>Thanks in advance.
>>>
>>>Rodd
>>
>>Because your form starts out maximized, the resize event does not fire.
>>
>>Try putting this.ntmResizer._AdjustControls(this) in to init event of the form.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform