Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Releasing a FORM & closing MSDOS WINDOW
Message
De
05/12/2003 08:51:33
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00856152
Message ID:
00856224
Vues:
20
This message has been marked as the solution to the initial question of the thread.
If you have an object associated with it by calling it using:
DO FORM linesform NAME Olines LINKED
*--Now release it from somewhere else
IF UPPER(TYPE('olines'))="O" .AND. Olines<>.NULL.
   	Olines.VISIBLE=.F.
   	Olines.RELEASE()
ELSE
   	Olines=.NULL.
   	RELEASE Olines
ENDIF
Or you can step through all of the current active forms and do something similar to:
* Release myform by stepping through all forms
clear
LOCAL llFound, loForm
llFound=.F.
FOR EACH loForm IN _SCREEN.FORMS
	IF UPPER(ALLTRIM(loForm.CAPTION))='MYFORM'
		llFound=.T.
		loform.release()
		? 'Found caption myform and closed it'
		EXIT
	ENDIF
	IF UPPER(ALLTRIM(loForm.name))='MYFORM'
		llFound=.t.
		loform.release()
		? 'Found name of myform and closed it'
		EXIT
	ENDIF
ENDFOR
RETURN
For the dos window you can
run /N <your pkzip command>
or create a batch file that contains the pkzip command line in it and following that command line in the batch file add an exit and then run the batch file instead.



>Help:
>
>How do I release a form from another program/procedure. I tried the
>release.frmname COMMAND per VFP help but it doesn't work.
>
>Second. How can I AUTO CLOSE the MSDOS window which is opened by a RUN
>COMMAND - specifically, I'm running a PKZIP command for backup to floppy drive.
>
>Harry
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform