Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing the TopLevel form from toolbar button
Message
From
20/01/1999 09:15:31
 
 
To
20/01/1999 07:56:14
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00177934
Message ID:
00177965
Views:
36
>How can I close the TopLevel form from the button on toolbar (In TopLevelForm)?
>Mycode
>
>*Form.Activate*
>IF !THIS.IsLoadedTool
> THIS.oToolbar = CREATEOBJECT('myToolbar')
> THIS.oToolbar.VISIBLE = .t.
> THIS.IsLoadedTool = .t.
>ENDIF
>
>*Toolbar.cmdClose*
>IF TYPE('myForm')="O" AND !ISNULL(myForm)
> myForm.oToolbar = .NULL.
> myForm.RELEASE()
>ENDIF
>
>Toolbar is hide, but form is not released.
>Thanks.
>Denis

Yes, for some reason it does not work straightforward. One workaround is to add timer to top form with:
Timer.Enabled=.f.
and Release Thisform in Timer.Timer event.
Now firing Topform.Timer.Enabled=.T. from some toolbar's button.click event will do it.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform