Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to really cancel a form?
Message
From
21/04/2005 14:23:44
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
To
21/04/2005 14:09:40
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01007086
Message ID:
01007173
Views:
21
Thanks Fabio.

Mike

>>Hi Fabio,
>>
>>I can't seem to make it work. I always get an "Invalid Input" wait window. I cut and paste your code then ran it. I then clicked into the textbox so that it has focus. Next I try to click on the Cancel button and all I get is the wait window. The form does not release!
>>
>>What am I doing wrong?
>>
>>Mike
>>
>None, my error!
>
>this support Title X and popup close ( OS messages )
>
>PUBLIC oMyform
>oMyform=NEWOBJECT("form1")
>oMyform.Show
>RETURN
>
>DEFINE CLASS form1 AS form
>
>	ADD OBJECT text1 AS textbox WITH ;
>		Left = 10, ;
>		Top = 10, ;
>		Width = 100
>		
>	ADD OBJECT cmdCancel AS commandbutton WITH ;
>		Top = 10, ;
>		Left = 256, ;
>		Height = 24, ;
>		Caption = "Cancel",;
>		Cancel = .T.	
>
>	PROCEDURE text1.Valid
>		DEBUGOUT thisform.ReleaseType
>		RETURN !EMPTY(this.value)
>	ENDPROC
>
>	PROCEDURE text1.ErrorMessage
>		DEBUGOUT thisform.ReleaseType,LASTKEY()
>		IF thisform.ReleaseType > 0 OR LASTKEY()=27
>			thisform.Release()
>		endif
>	ENDPROC
>
>	PROCEDURE cmdCancel.Click
>		thisform.Release()
>	ENDPROC
>
>ENDDEFINE
>
Previous
Reply
Map
View

Click here to load this message in the networking platform