Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Min button
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
01447785
Message ID:
01447821
Views:
73
>>>>>>I have a lot of forms in my app, I was wondering of a way to disallow minimizing all forms in one fell swoop?
>>>>>
>>>>>You can do a loop through _screen.Forms collection and set MinButton = .f. for each of them, e.g.
>>>>>
>>>>>for each oForm in _screen.Forms
>>>>>    if pemstatus(oForm, 'MinButton',5)
>>>>>       oForm.MinButton = .f.
>>>>>   endif
>>>>>endfor
>>>>>
>>>>>from the top of my head - not tested.
>>>>
>>>>That works fine, but just for forms already open. Maybe I'm asking the impossible. My main form simply opens other forms, and they in turn can open still more forms.
>>>
>>>How your main form opens other ones?
>>>Or meybe you should your own class based on form that could handle all for you?
>>
>>Example: user clicks a button for a year selection form and that form has a button for a data entry form, and that form opens smaller ones as needed.
>
>As Boris said, you may need to have MinButton set to false in your base class (if you use one). Do you use Do FORM statement or you have some routine to call the form?

That would be the answer, do it in the base class! However I started this monster app years ago before I thought to have the form sub-classed( although most of my controls are now). Not a major problem, but now I know.
thanks
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform