Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Show form maximized problem
Message
From
21/11/2003 15:57:52
Mike Sue-Ping
Cambridge, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00852423
Message ID:
00852468
Views:
9
Thanks Richard.

Your suggestion works, but, it's not perfect:) My only complaint about this workaround is that my form can be seen displayed at it's design time size for about a split second before it actually maximizes. This produces a flickering effect. Oh well, it's one step closer...

Do you think that the issue I've described in my original message (and that you've also run into) is a VFP bug?

Mike


>I hit this before in one of my own. Try working in the Activate Event. See if that helps. You may need to block it off with something like:
>
>IF EMPTY(THISFORM.Tag)
> thisform.MyResize()
> thisform.Tag = "1"
>
>ENDIF
>
>HTH
>Richard
>
>>I tried your suggestion but it still does not work. It's easy to reproduce:
>>
>>1) Create a form and drop a container control on it named Container1.
>>2) Set the form's WindowState = 2
>>3) Add a custom method called MyResize(). Add the following code:
>>
>>
thisform.Container1.Left = 0
>>thisform.Container1.Width = thisform.Width/2
>>thisform.Container1.Top = 0
>>thisform.Container1.Height = thisform.Height/2
>>
>>4) In the form's Init() and Resize() events, put:
>>
>>
thisform.MyResize()
>>
>>
>>When the form runs, the container is found at the 0,0 coordinates as expected, however, it's size is the same as in design mode. Now if you make the form it's normal size then maximize it again, everything is ok. If you resize the form, everthing is ok. It only fails when it first shows. Go figure...
>>
>>
>>Mike
>>
>>
>>>Hi Mike,
>>>
>>>It sounds like when you start the form initially maximized the form Resize event doesn't fire because the form isn't truly resizing.
>>>
>>>Try changing the window state in Init() or put the code in a custom method and call that method from the Init and Resize events.
>>>
>>>Jason
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform