Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making form STAY invisible
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Making form STAY invisible
Miscellaneous
Thread ID:
00295073
Message ID:
00295073
Views:
58
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
Next
Reply
Map
View

Click here to load this message in the networking platform