PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WD[19] Print current window
WD[19] Print current window
Iniciado por guest, 20,ago. 2015 11:55 - 1 respuesta
Publicado el 20,agosto 2015 - 11:55
Hi,

How can i print a current window.

Thanks
Publicado el 20,agosto 2015 - 12:59
hi Ankur

my post from a few years back:


we use an global procedure
create an global variable:
bestand is string = "i:\enetre.bmp" // here will the picture be saved c:\ emp also do
when an user want to do a certain process we capture first an screen printout

IF bPrint = 1 THEN
CAPTUREECRAN(bestand)
iPrintImage(bestand,20,20,174,151)
iEndPrinting
END

the global procedure
PROCEDURE CAPTUREECRAN(NomBMP)
NomDest is string // Nom du champ image destination

// Initialisation des paramètres
NomDest="screendump" // Champ image qui sert pour la sauvegarde

// Initialise la taille du champ destination à la taille de la zone à copier
{NomDest}..Width=WinInWidth()
{NomDest}..Height=WinInHeight()
dCopyBlt(copyScreen,NomDest,copySrcCopy,WinInXPos(),WinInYPos(),WinInHeight()+2,WinInWidth()+2)

// Sauvegarde au format BMP
dSaveImageBMP(NomDest,NomBMP)
dEndDrawing(NomDest) // Libère la taille prise en mémoire

marc :cool: