Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running Code at the Form Release
Message
 
To
23/07/2004 03:33:01
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00927288
Message ID:
00927291
Views:
21
The Unload method is run when the 'X' is clicked and when the Release method is run. Here's an example :
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN


**************************************************
*-- Form:         form1 (c:\isco4ajb\isco\form1.scx)
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   07/23/04 09:03:10 AM
*
DEFINE CLASS form1 AS form


	DataSession = 2
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 192, ;
		Left = 204, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "Command1", ;
		Name = "Command1"


	PROCEDURE Unload
		MessageBox(Program(Program(-1)))
		USE in 'MyCursor'
		DoDefault()
	ENDPROC


	PROCEDURE Release
		MessageBox(Program(Program(-1)))
		DoDefault()
	ENDPROC


	PROCEDURE Load
		Create Cursor MyCursor (field1 c(10))
		DoDefault()
	ENDPROC


	PROCEDURE command1.Click
		thisform.Release
	ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
Previous
Reply
Map
View

Click here to load this message in the networking platform