General information
Category:
Coding, syntax & commands
>>>>Hi all,
>>>>
>>>>I've been using some resizing code ( from the UT, of course ) to allow users to resize my forms. This code has been working flawlessly.
>>>>
>>>>Now though, there's one form that I want to be maximized when it first opens. So, of course, I set the WINDOWSTATE to 2... but all my controls stay the same, smaller, size...
>>>>
>>>>I've tried calling THISFORM.Resize directly after I change the window state but I guess I'm expecting the "Resize" method to fire automatically if I change the windowstate...
>>>>
>>>>Is this not the case?
>>>>
>>>>TIA
>>>
>>>
>>>Hi Larry,
>>>
>>>Yeah, I've run into this before too. I don't remember what my 'elegent' solution was. Now that I'm thinking about it, you might be able to create an assign method for the WindowState property that fires the Resize event.
>>
>>All of the resizing code is in the base class... any chance that it's not being called at all?
>>
>>If I use THISFORM.RESIZE, shouldn't that call the base class code?
>>
>>TIA
>
>Not necessarily. It will run the base class code if you are not overriding it anywhere.
>
>What version of FoxPro are you using? I'm using 6, and I created a test class that displays a message in the Resize event. I then created an instance of that class and played with the WindowState property. Every time I changed it, the Resize fired. So, to backtrack, what you have done should work without having to explicitly call the Resize.
<>
The only place I could be overriding it is in the Resize method of the form, correct? And I'm not doing that, the resize method is empty... Hmmmm maybe I'll put a DODEFAULT() in there just for kicks...
Thanks for your help
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only