Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DOS Reports and Screen Refresh Issue in VFP7/VFP8
Message
De
04/06/2003 15:32:50
 
 
À
04/06/2003 15:11:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00796320
Message ID:
00796331
Vues:
16
Following printing the report, I have since added a wait state after setting the _screen properties which seems to work (right now anyway, we'll see if it works for all machines), but it should not be necessary. We only started resetting the _screen properties at this point in the app for troubleshooting purposes, it should not be necessary either. Nothing is intentionally changing the screen properties at all. It does not always happen on the same machine or in the same program or report. Very difficult one to isolate.
	IF SET('PRINT') = 'ON'
		SET PRINT OFF
	ENDIF
	IF SET('CONSOLE') = 'OFF'
		SET CONSOLE ON
	ENDIF
	SET DEVICE TO SCREEN
	SET PRINTER TO

	*--TCH 06/04/2003 BEGIN Set printer font back to standard font for this printer
	IF TYPE('sFontStd')="C" .and. !EMPTY(sFontStd)
		SET PRINTER FONT &sFontStd
	ENDIF
	*--TCH 06/04/2003 END

	ACTIVATE SCREEN
	
	* --TCH 06/04/2003 Added additionally settings to reshow screen
	With _Screen
		 .LockScreen=.T.		&& Disable screen redraw
		 .fontname=glFontName
		 .fontsize=glFontSize
		 .fontbold=.f. 
		 .BorderStyle=1			&& 0=no border, 3=sizeable, 1=fixed single, 2=dialog
		 .WindowState=0			&& 2=maximized,1=minimized,0=normal
		 .Closable=.F.			&& Can only quit by typing 99
		 .ControlBox=.T.
		 .MaxButton=.F.
		 .MinButton=.T.
		 .Width = glWidth
		 .Height = glHeight
		 .MinWidth = glWidth
		 .MinHeight = glHeight
		 .autocenter=.F.

		* Set VFP desktop top to half the difference between 
		* monitor resolution height and _vfp.height
		_vfp.Top = (Sysmetric(2) - _vfp.Height)/2
		_vfp.Left= (Sysmetric(1) - _vfp.width)/2
		IF _vfp.Top>1				&& allow for startmenu if room permits
			_vfp.Top=1
		ENDIF
		IF _vfp.Height<(Sysmetric(2)-4)
			_vfp.Top=_vfp.Top+2
		ENDIF
		.LockScreen=.F.		&& Enable screen redraw
		.visible=.T.
	Endwith

	DECLARE Sleep IN Win32API;
	  		INTEGER nMilliseconds
	= Sleep(100) && Wait a 1/10th of a second.
	CLEAR DLLS "sleep"
.·*´¨)
.·`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