Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unwanted _screen clearing
Message
From
10/06/2003 15:38:18
 
 
To
10/06/2003 14:40:35
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00798388
Message ID:
00798575
Views:
44
I'm using VFP7 and VFP8 and it happens in both versions. Pardon me for asking, but if you run this prg, does your screen clear when it is finished? (Usually on the _screen.lockscreen=.f. line):
*testprg.prg
set COLOR TO gr+/r, g/w+
IF !PEMSTATUS(_Screen,'glfontname',5) 
   	_Screen.AddProperty('glfontname')
ENDIF
IF !PEMSTATUS(_Screen,'glfontsize',5) 
   	_Screen.AddProperty('glfontsize')
ENDIF
IF !PEMSTATUS(_Screen,'coldbackcolor',5) 
   	_Screen.AddProperty('coldbackcolor')
ENDIF
IF !PEMSTATUS(_Screen,'coldforecolor',5) 
   	_Screen.AddProperty('coldforecolor')
ENDIF
IF !PEMSTATUS(_Screen,'coldfillcolor',5) 
   	_Screen.AddProperty('coldfillcolor')
ENDIF
_screen.glfontname=_screen.fontname
_screen.glfontsize=_screen.fontsize
_screen.cOldbackcolor=_screen.backcolor
_screen.coldforecolor=_screen.forecolor
_screen.coldfillcolor=_screen.fillcolor
clear
dir
dir
dir
#IF "VISUAL" $ UPPER(VERSION())
	IF !PEMSTATUS(_Screen,'Printscr',5) 
    	_Screen.AddProperty('Printscr')
	ENDIF
	ACTIVATE SCREEN
	SAVE SCREEN TO _Screen.Printscr
	_screen.lockscreen=.t.
	_Screen.BackColor = RGB(255,255,255)
	_Screen.ForeColor = RGB(0,0,0)		
	_Screen.FillColor = RGB(255,255,255)	
	_screen.refresh
#ENDIF

*Screenrset
glfontname=_screen.glfontname
glfontsize=_screen.glfontsize
coldbackcolor=_screen.coldbackcolor
coldforecolor=_screen.coldforecolor
coldfillcolor=_screen.coldfillcolor

#IF 'VISUAL' $ UPPER(VERSION())

	DECLARE Sleep IN Win32API;
	  		INTEGER nMilliseconds
	= Sleep(100) && Wait a 1/10th of a second.

	* TCH 7/10/2002 Added
		
	WITH _screen
		.fontname=glFontName
		.fontsize=glFontSize
		.fontunderline=.f.
		.fontbold=.f. 
		.BackColor = cOldbackcolor
		.ForeColor = cOldforecolor
		.FillColor = cOldfillcolor
		.LockScreen = .F.
	ENDWITH

	ACTIVATE SCREEN
	IF PEMSTATUS(_Screen,'Printscr',5)
                * Stepping through this, the next line DOES run as it should
                * and running it after the prg finishes it works
		RESTORE SCREEN FROM _Screen.printscr
		= Sleep(100) && Wait a 1/10th of a second.
	ENDIF

	CLEAR DLLS "sleep"

#ENDIF

RETURN
.·*´¨)
.·`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"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform