Article ID: 128117
Article Last Modified on 2/12/2000
*********************************************************************
* This sample program defines a toolbar with a generic close button *
*********************************************************************
* The instance variable for this toolbar may not have to be public in
* your program.
PUBLIC oGenericTool
oGenericTool=CREATEOBJECT('mytool')
oGenericTool.SHOW
* Executes a form
DO FORM GETFILE('SCX','Select the Form','Run')
DEFINE CLASS mytool AS TOOLBAR
ADD OBJECT ToolButton AS ToolClose
ENDDEFINE
* Code for the command button. This code can be included in a Visual
* Class Library
DEFINE CLASS Toolclose AS COMMANDBUTTON
Height= 51
Width = 54
Name = "Vcrclose"
CAPTION = "Close it"
PROCEDURE Click
IF TYPE('_screen.ActiveForm')=='O'
IF NOT ISNULL (_SCREEN.ACTIVEFORM)
_SCREEN.ACTIVEFORM.RELEASE()
ENDIF
ELSE
=MESSAGEBOX("There is no form to close")
ENDIF
ENDPROC
ENDDEFINE
Additional query words: VFoxWin quit
Keywords: kbcode KB128117