Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Firing up a form in middle of method code
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00007507
Message ID:
00007841
Views:
45
>>I might be a bit thick, but I can't seem to fire up a member form of a formset while processing method code in another form of that set.
>
>Gordon, I have found that unless the form you "fire up" is modal, you will run into trouble when trying to do a READ EVENTS from within an event (or if within an event, you call any procedure that loads another non-modal form and tries to READ EVENTS).
>
>Instead, you need to:
>- within your event code, issue a CLEAR EVENTS and set a flag of some type to indicate that the user asked for something to be done
>- within the code right after your original READ EVENTS command, test to see if that flag has been set. If so, act on it. Remember that if you then paint another form that is non-modal, both your original form and the new form will be active when you issue the next READ EVENTS. You can always do something like frmMyBaseForm.Enabled=.F.
>
>Or, you can build the second form as a modal form. Because of VFP 3.0's sluggish speed at painting complex forms, I sometimes forego the modal approach , but I only DO the second form once as a non-modal form, and from that point on, hide it and reshow it because that is so much faster.


Try using:

thisformset.frmAPRptMnu.hide()
thisformset.frmCropMnu.show()

This works for me.

Tom
Tom
--------------------------------
Tom O'Hare
407-299-4268 -- tom@redtile.com -- http://www.redtile.com/
Independent Programmer Using Visual FoxPro, Visual Basic & more...
Operations Manager -- Virtual FoxPro User Group (VFUG)
http://www.vfug.org/ -- tom@vfug.org
President -- Central Florida FoxPro User Group (CFFUG)
http://www.redtile.com/foxpro/
Universal Thread Most Valued Professional (MVP)
http://www.transformation.com/foxpro/
Previous
Reply
Map
View

Click here to load this message in the networking platform