Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More MODAL forms
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00115397
Message ID:
00115471
Views:
18
>>>Leighton,
>>>
>>>Yes, exactly. Modify your code to htis for a modal form;
>>>
>>>
>>>this.addobject('oReindex', 'frmReindex')
>>>
>>>with this.oReindex
>>>   .setall('fontname', this.FontName)
>>>   .setall('fontsize', this.FontSize)
>>>   .show()
>>>endwith
>>>
>>>* Release the external reference to the form object
>>>THIS.oReindex = NULL
>>>
>>>return
>>>
>>>
>>>The above will not work well for non-modal forms.
>>
>>I modified the code as specified. When ran, the app is waiting at the .show statement (as it should) for the window to be released. Once I get to the this.oReindex = NULL statement there is no oReindex.
>>I added a Close button with thisform.release, but if my users use the close button on the title bar, the form just sits there until they press the new Close button.
>Leighton,
>
>The form event that fire on using the close box in the title basr is the QueryUnload and it will release the form unless there is a NODEFAULT command in it.
>
>In your reply you said that when the code got to the oReindex = NULL line that "is no oReindex", does this mean you got an error on that line? Also, what is THIS in your code, is it a formset or something else?

Jim,

I recieved error 1734 Property oReindex is not found.

The "This" is my application object, oApp. From the application menu, the reindex option calls oApp.ShowReindex(). This method in my application object adds the frmReindex form class (as oReindex) to my oApp object and shows it (the code you saw previously). From here users can reindex, rebuild or exit the reindex form. I wanted this to be a modal form so users would not leave it up while doing other things.

BTW, I added thisform.release() to the QueryUnload event and the modal form did close when I pressed the close button in the title bar. I thought this would have been the default behavior though.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform