Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making form STAY invisible
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Making form STAY invisible
Divers
Thread ID:
00295073
Message ID:
00295073
Vues:
59
Hey all!

I've got an annoying little problem. I've got a form that will display a text file, but I want the form to activate with visible=.f. and then test to see if that text file is there or not, if not then release the form and continue on...otherwise, visible=.t. and display the text. My problem is that the form flashes on the screen if there's nothing to display...I've got this code in the load event:
THISFORM.VISIBLE=.F.
THISFORM.LOCKSCREEN=.T.
this in the activate event:
CREATE CURSOR textfile (filename c(50), filecontent m) 
APPEND BLANK
replace textfile.filename with left(gcCOMMITPATH,RAT("\",gcCOMMITPATH))+"INSTRUCTIONS.TXT"
IF FILE(TEXTFILE.FILENAME)
	APPEND MEMO FILECONTENT FROM (TEXTFILE.FILENAME) OVERWRITE
	THISFORM.edtText.ControlSource = "textfile.FILECONTENT"
	THISFORM.Refresh
	THISFORM.LOCKSCREEN=.F.
	THISFORM.VISIBLE=.T.
ELSE
	THISFORM.RELEASE
ENDIF
Where gcCOMMITPATH is a PUBLIC variable holding the location of the text file. Where am I going wrong? I'm sure it's something simple.
TIA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform