How do I save virtual window images
Moderator: Rathinagiri
How do I save virtual window images
Hello, guys
I need to save the image in the virtual window, but I don't know how to do it. Please help me solve it.
Thanks
I need to save the image in the virtual window, but I don't know how to do it. Please help me solve it.
Thanks
- AUGE_OHR
- Posts: 2062
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: How do I save virtual window images
hi,
you can pass "Mainform" as Parameter and use Macro cForm (no " ")
this Code save Context of Window except Statusbar
Code: Select all
METHOD SaveBitmap() CLASS DemoForm
LOCAL nWidth := GetProperty( "MainForm", "ClientAreaWidth" )
LOCAL nHeight := GetProperty( "MainForm", "ClientAreaHeight" )
LOCAL nSB, aRect := { 0, 0, 0, 0 }
LOCAL cFile
// get height of Statusbar
nSB := GetControlHandle( "STATUSBAR", "MainForm" )
IF !EMPTY( nSB )
GetWindowRect( nSB, @aRect )
ENDIF
nHeight -= ( aRect[ 4 ] - aRect[ 2 ] ) // reduce height of STATUSBAR
// get Name to save Bitmap
cFile := GetInPut( "Bitmap", "save Bitmap", "DLT.BMP", 1 )
IF EMPTY( cFile )
ELSE
IF FILE( cFile )
FERASE( cFile )
ENDIF
// make snapshot
Domethod( "MainForm", "Capture", cFile, 0, 0, nWidth, nHeight )
ENDIF
RETURN NIL
have fun
Jimmy
Jimmy
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: How do I save virtual window images
Hi,
See doc and Bos Taurus demo:
hBitmap := BT_BitmapCaptureClientArea (Win, Row, Col, Width, Height)
BT_BitmapSaveFile (hBitmap, cFileName, nTypePicture)
See doc and Bos Taurus demo:
hBitmap := BT_BitmapCaptureClientArea (Win, Row, Col, Width, Height)
BT_BitmapSaveFile (hBitmap, cFileName, nTypePicture)
Re: How do I save virtual window images
Thank you srvet_claudio ,
Thank you AUGE_OHR .
Thank you AUGE_OHR .
Re: How do I save virtual window images
Hi,
I want to save the full image in the virtual window, including the invisible part beyond the screen size.
In tests, these functions save only the visible part of the window, and the invisible part beyond the screen size is still not saved.
I want to save the full image in the virtual window, including the invisible part beyond the screen size.
In tests, these functions save only the visible part of the window, and the invisible part beyond the screen size is still not saved.
- AUGE_OHR
- Posts: 2062
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: How do I save virtual window images
change
Code: Select all
LOCAL nWidth := GetProperty( "MainForm", "ClientAreaWidth" )
LOCAL nHeight := GetProperty( "MainForm", "ClientAreaHeight" )
Code: Select all
LOCAL nWidth := GetProperty( "MainForm", "Width" )
LOCAL nHeight := GetProperty( "MainForm", "Height" )
have fun
Jimmy
Jimmy
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: How do I save virtual window images
Hi,
it is not possible, in a virtual window the SO only paints the visible part of the controls. The invisible part is only painted when the user scrolls the scroll bar.
it is not possible, in a virtual window the SO only paints the visible part of the controls. The invisible part is only painted when the user scrolls the scroll bar.
Re: How do I save virtual window images
Thank you srvet_claudio.