Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unwanted _screen clearing
Message
From
10/06/2003 15:42:13
 
 
To
10/06/2003 15:40:06
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00798388
Message ID:
00798579
Views:
26
That MUST be a bug...Did you try in VFP7 and VFP8?

>I Dunno. Just want to say that I also get same return as you using 4 IF the property doesn't exist, but I did get a .T. if it did exist (did it in Command Window:
_screen.AddProperty("PrintScr")
>? PEMSTATUS(_Screen,'Printscr',4)   && returned .T.
>? PEMSTATUS(_Screen,'xPrintscr',4)  && got error, as you did (which does seem like a bug, doncha think?)
>
>
>
>>I if try: ? PEMSTATUS(_Screen,'Printscr',4)
>>
>>it returns: function, argument value, type, or count is invalid...
>>
>>Hmmmmm,
>>interesting. 5 returns the right values (.t. if the property exists), but it clears the screen.  Wonder why it doesn't for everyone.  This happens if I run it immediately from starting VFP after typing 'dir' from the command window to draw something on the screen.  Of course, I start out with screen colors like gr+/r,n/w etc and I am changing screen colors in the screenset procedure and setting them back in the screenrset procedure...
>>
>>>Well I'll try a coupla things...
>>>
>>>1) Maybe PEMSTATUS should be checking 4 instead of 5?
>>>--- You could really get by without the PEMSTATUS I think.
>>>2) Maybe ADDPROPERTY() would make a difference?
>>>
>>>good luck
>>>
>>>
>>>>Anyone?  My goal is to restore the original screen that was saved in the screenset procedure.
>>>>
>>>>:o)
>>>>
>>>>>IF I have information on the screen (even issuing dir from the command window to draw on the screen) and I run this code:
>>>>><PRE>
>>>>>*Screenset
>>>>>#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
>>>>>
>>>>>RETURN
>>>>>
>>>>>
>>>>>and then I clear the screen or redraw it or something and then I issue:
>>>>>
>>>>>*screenrset
>>>>>#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
>>>>>	ENDWITH
>>>>>
>>>>>	_SCREEN.lockscreen=.F.
>>>>>	
>>>>>	ACTIVATE SCREEN
>>>>>	IF PEMSTATUS(_Screen,'Printscr',5)
>>>>>		RESTORE SCREEN FROM _Screen.printscr
>>>>>		= Sleep(100) && Wait a 1/10th of a second.
>>>>>	ENDIF
>>>>>
>>>>>	CLEAR DLLS "sleep"
>>>>>
>>>>>#ENDIF
>>>>>
>>>>>
>>>>>Why does the screen clear? It does the same thing even with no change to the screen in between the two procedures...it always appears to occur when the screen is unlocked in the screenrset procedure.
.·*´¨)
.·`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