Save all the Screen to BMP
Save all the Screen to BMP
Hi,
I am using a TIMER to intercept a F8 key to try to create a BMP of all the video screen, but i'am not able !!
This is my example:
define timer otime interval 50 action myfunc() of mainwnd
activate timer otime
.
.
.
function myfunc
if getasynckey(119)
* F8 pressed
HERE i need to write a BMP file with all the present screen
endif
return nil
*
ANY HELP ?
tks all
ROMEO/zingoni
I am using a TIMER to intercept a F8 key to try to create a BMP of all the video screen, but i'am not able !!
This is my example:
define timer otime interval 50 action myfunc() of mainwnd
activate timer otime
.
.
.
function myfunc
if getasynckey(119)
* F8 pressed
HERE i need to write a BMP file with all the present screen
endif
return nil
*
ANY HELP ?
tks all
ROMEO/zingoni
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
Re: Save all the Screen to BMP
Try:
oWnd:SaveToBmp( cFile )
oWnd:SaveToBmp( cFile )
Thanks,
Jeff Barnes
(FWH 12.01, xHarbour 1.2.1, Bcc582)
Jeff Barnes
(FWH 12.01, xHarbour 1.2.1, Bcc582)
Re: Save all the Screen to BMP
It works !!!
Now i need to know on with windows o dialog i'am pressing F8
More help f me ?
thanks any
Now i need to know on with windows o dialog i'am pressing F8
More help f me ?
thanks any
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Save all the Screen to BMP
Try this:
oWndFromHwnd( GetFocus() ):SaveToBmp( cFile )
oWndFromHwnd( GetFocus() ):SaveToBmp( cFile )
Re: Save all the Screen to BMP
it works bad on windows and does not work for dialog
i have FWH 8.10
i have FWH 8.10
Re: Save all the Screen to BMP
I tried the GETACTIVEWINDOW() and it works, but it saves only the windows/dialog focused instead of all the screen.
I try to find other solution !
Hi
I try to find other solution !
Hi
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Save all the Screen to BMP
GetDesktopWindow() returns the handle for the entire screen
Re: Save all the Screen to BMP
Too simple to solve the problem !!!
Many thanks Antonio
R
Many thanks Antonio
R
-
- Posts: 93
- Joined: Mon Apr 30, 2012 9:10 am
Re: Save all the Screen to BMP
Can you please share final code?.
Re: Save all the Screen to BMP
function save_scr()
LOCAL hBmp, hDib,h,cFile := "screen.bmp"
h:=getdesktopwindow()
hBmp := WndBitmap(h)
hDib := DibFromBitmap( hBmp )
DibWrite( cFile, hDib )
GloBalFree( hDib )
DeleteObject( hBmp )
RETURN nil
*
* Now i'm tring to convert the BMP file to JPG file....any help ?
LOCAL hBmp, hDib,h,cFile := "screen.bmp"
h:=getdesktopwindow()
hBmp := WndBitmap(h)
hDib := DibFromBitmap( hBmp )
DibWrite( cFile, hDib )
GloBalFree( hDib )
DeleteObject( hBmp )
RETURN nil
*
* Now i'm tring to convert the BMP file to JPG file....any help ?
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Save all the Screen to BMP
Romeo,
You could try:
FIConvertImageFile( cDestinationFileName, cSourceFileName, nFormat, nQuality )
You could try:
FIConvertImageFile( cDestinationFileName, cSourceFileName, nFormat, nQuality )
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Save all the Screen to BMP
thanks but the
FIConvertImageFile()
in missing in my FWH 8.10
FIConvertImageFile()
in missing in my FWH 8.10
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Save all the Screen to BMP
Romeo,
I can't help you with that as such function depends on some others that you may not have too.
I suggest you to upgrade your FWH from www.fivetechsoft.com, thanks
I can't help you with that as such function depends on some others that you may not have too.
I suggest you to upgrade your FWH from www.fivetechsoft.com, thanks