Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Show form maximized problem
Message
 
To
21/11/2003 15:29:21
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00852423
Message ID:
00852458
Views:
9
This message has been marked as a message which has helped to the initial question of the thread.
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
State of Florida, DCF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform