Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Close top form from toolbar
Message
 
 
To
26/01/2005 18:43:58
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00981030
Message ID:
00981534
Views:
33
>My main form which is a top-level form has A toolbar that is opened as in top-level form. What is a way to close main form from a click on a toolbar button?
>
>Thanks, Mark

Forget variables, etc. You can only have 1 top-level form in your app so use the following code to get an object reference to your TLF:
LOCAL loForm, loRetObj
loRetObj = NULL
FOR EACH loForm IN _SCREEN.FORMS
    IF loForm.SHOWWINDOW = 2
       loRetObj = loForm
       EXIT
    ENDIF
ENDFOR
RETURN loRetObj
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform