Here is the documentation thus far...
Code: Select all
'************************************************************************
' FBWinPrint v 0.12 - Windows Printing Library for FreeBASIC
' by Vincent DeCampo
'
' Rev 0.12 (09/19/2007)
'
' - Fixed using StretchBlt with printer DC
' - Added DrawBox, PrintWindow
' - Fixed PrintBMP Crash
'
' Rev 0.11 (09/17/2007)
'
' - Corrected scaling of font to device context
'
' Rev 0.10 (09/15/2007)
' PrintObj (Printer Object)
'
' -Properties
' .PrinterDC (the device context of the currently selected printer.)
' (This updates when the printer changes via Dialog method)
'
' .PrinterName (The Name of the currently selected printer.)
' (This updates when the printer changes via Dialog method)
'
' .PageWidth (The width of the page in device units
' (This updates when the printer changes via Dialog method)
'
' .PageHeight (The width of the page in device units
' (This updates when the printer changes via Dialog method)
'
' -Methods
' OpenFile() As String
' (Opens an OpenFile window and returns Selected Filename.)
' (Returns an empty ("") string when CANCEL is selected)
'
' SaveFile() As String
' (Opens a SaveFile window and returns Selected Filename.)
' (Returns an empty ("") string when CANCEL is selected)
'
' ColorPicker() As Integer
' (Opens a Color Picker window and returns Selected RGB value.)
' (Returns -1 when CANCEL is selected)
'
' Font(ByRef FontName As String, ByRef FontSize As Integer) As String
' (Opens a Font window and returns Selected Font Name.)
' (Returns an empty ("") string when CANCEL is selected)
'
' Dialog() As String
' (Opens a Print Dialog window and returns selected Printer.)
' (This method will update the .PrinterName And .PrinterDC properties)
' (Returns an empty ("") string when CANCEL is selected)
'
' PageSetup() As Integer
' (Opens a Page Setup window.)
' (Returns -1 when CANCEL is selected)
'
' DocStart(DOCTitle As String = "Untitled")
' (Begins a print job)
'
' PageStart()
' (Begins a new page of a print job)
'
' PageEnd()
' (Ends current page of a print job)
'
' DocEnd()
' (Sends print job to printer)
'
' DocAbort()
' (Aborts current print job)
'
' BltImageDC (srcDC As HDC, srcRECT As RECT Ptr, dstRECT As RECT Ptr)
' (Draws an image to the printer from an existing Bitmap DC)
' (dstRECT.Right/.Bottom contain destination width and height)
'
' PrintBMP (Filename As String, dstRECT As RECT)
' (Draws an image to the printer from an existing Bitmap Image File)
' (dstRECT.Right/.Bottom contain destination width and height)
'
' PPrint (X As Integer, Y As Integer, Text As String)
' (Prints Text to the printer at the specified x,y using the font
' (specified by the SetFont method.)
'
' SetFont(FontName As String, FontSize As Integer, FontColor As Integer)
' (Sets the Font, Size and Color to use with the PPrint method)
'
' DrawBox (X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer, LineColor As Integer)
' (Draws a colored box from X1,Y1 (upper left) to X2,Y2 (Lower Right)
' (Box is white filled and should be drawn first before adding internal text)
'
' PrintWindow (hWnd As HANDLE, X As Integer, Y As Integer, dX As Integer, dY As Integer)
' (Draws an copy of a window to the printer from an existing hWnd)
' (dX/dY contain destination width and height)
'
'************************************************************************
-Vince