Print Windows Form
Posted: Fri Aug 30, 2013 10:49 am
Working Example to Print Windows Form
Exclusive forum for HMG, a Free / Open Source xBase WIN32/64 Bits / GUI Development System
http://hmgforum.com/
Thank you, Esgiciesgici wrote:Thanks Dave
Successful
Happy HMG'ing
Hi Dave.bpd2000 wrote:Thank you, Esgiciesgici wrote:Thanks Dave
Successful
Happy HMG'ing
Attached example for Saving of Window / Form [unable to compile in HMG, it is compiled in Minigui]
Any one can do necessary correction to compile in HMG
Code: Select all
Capture a Window As a Bitmap File And Save It
Syntax:
<WindowName>.Capture [ ( cFileName , nRow , nCol , nWidth , nHeight ) ]
Thank Davebpd2000 wrote: Modified Sample Print & Save
These are the new functions we have:mol wrote:Nice work, thanks for sharing!
I don't know if it's good place to ask my question:
Is it the way to print bitmap created in memory without saving it to temporary file?
I need to generate labels for range of goods with barcodes.
Code: Select all
New Functions:
OpenPrinterGetDC() --> hDC of the current Open Printer
OpenPrinterGetPageDC() --> hDC of the current Page being printed
Code: Select all
BT_DrawBitmap (hDC, Row, Col, Width, Height, Mode_Stretch, hBitmap)
Draws a bitmap in the Device Context (DC) specified.
hDC: is a handle to the device context.
Row, Col, Width, Height: specifies the size of the rectangle in pixels in the DC where you will draw the bitmap. For default: Row = 0, Col = 0, Width = BT_BitmapWidth(hBitmap), Height = BT_BitmapHeight(hBitmap).
Mode_Stretch: sets the mode as the bitmap is adjusts (is stretches or compresses) in the specified rectangle in the DC, it is one of the constants: BT_SCALE, BT_STRETCH or BT_COPY (defined in BosTaurus.CH).
hBitmap: is a handle to the bitmap.
Hi Billbluebird wrote:Friends of HMG
The Demonstration given to me in the archive printform.rar from a few sources looks like the answer to my printscreen need. However it always fails to compile with syntax errors at lines 65 67 77 79 149 151 153 155 and 157.
Has anyone else been successful?
Thanks