Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing Forms - whats the latest wisdom
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00700482
Message ID:
00700845
Vues:
15
>I have downloaded the file. I am not that familiar with classes I tend to steer clear. Could you possible tell me the code to call class printscreen form an app.
* calling
=printscr()

* add this code (from the author) to your function library
*********************************
* Print the current window
function printscr()

	DECLARE INTEGER GetDesktopWindow IN Win32api

	DECLARE INTEGER PrintWindow IN DibApi32 ;
	INTEGER HWnd, ;
	INTEGER fPrintArea, ;
	INTEGER fPrintOpt, ;
	INTEGER wxScale, ;
	INTEGER wyScale, ;
	STRING @ szJobName

	LOCAL nRetVal,cJobName && title you want to show when printing

	cJobName = 'Patient Database' && or whatever - this could be passed in as a parameter, also.

	nRetVal = PrintWindow(GetDesktopWindow(),1,1,0,0,@cJobName)
	IF nRetVal != 0
		IF nRetVal != 6 && 6 = User canceled printing
			MESSAGEBOX("Unable to print the window" + chr(10) + ;
			"See System Administrator " + STR(nRetVal),48, ;
			"Patient Database")
		ENDIF
	ENDIF

RETURN
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform