FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Capture Screen and save to file
Posts: 392
Joined: Tue Jul 29, 2008 01:55 PM
Capture Screen and save to file
Posted: Tue Jan 26, 2010 11:48 AM

Hello FiveWinners.

someone knows how to capture screen content and save to a file. JPG?

And as you can reduce the file size. Jpg?

As does Windows 7 at its bottom bar.

Thank you very much

Visite Chiapas, el paraiso de México.
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Capture Screen and save to file
Posted: Tue Jan 26, 2010 02:08 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 408
Joined: Fri Jan 29, 2010 08:14 PM
Re: Capture Screen and save to file
Posted: Sun Feb 14, 2010 02:48 AM

/------------------------------------------------------------------------------/
Function ImprimePantalla( oDlg, cFile )
/------------------------------------------------------------------------------/

/ Esta funcion crea un fichero BMP con el volcado de pantalla del Handle oDlg /
/ y luego se imprime. /

LOCAL hBmp, hDib, oPrn
DEFAULT cFile := "volcado.Bmp"

hBmp := WndBitmap( oDlg:hWnd )
hDib := DibFromBitmap( hBmp )
DibWrite( "TMP\" + cFile, hDib )
GloBalFree( hDib )
DeleteObject( hBmp )

PRINT oPrn NAME "Impresión de volcados de Pantalla" PREVIEW

  If Empty( oPrn:hDC )
     Return NIL
  End

  PAGE
     oPrn:SayBitmap( 800, 300, "TMP\" + cFile, 4200, 5000 )
  ENDPAGE

ENDPRINT

Return NIL

un saludo
JLL

Libreria: FWH/FWH1109 + Harbour 5.8.2 + Borland C++ 5.8.2
Editor de Recursos: PellecC
ADA, OURXDBU
S.O: XP / Win 7 /Win10
Blog: http://javierlloris.blogspot.com.es/
e-mail: javierllorisprogramador@gmail.com

Continue the discussion