74:
Can I preview the pages with no margins ( compact )

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:SetProperty("PreviewSettings",3/*exPreviewShowCompact*/,.T.)
		oPrint:SetProperty("PreviewSettings",0/*exPreviewShowPageNumbers*/,.T.)
		oPrint:SetProperty("PreviewSettings",1/*exPreviewPageNumberFormat*/,"<b><font ;14><out 000000><fgcolor=FFFFFF><%page%></fgcolor></out></font>")
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
73:
I have noticed that I can zoom the pages in the Print and Print-Preview, using the middle mouse buttons. How can I disable this
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:SetProperty("PreviewSettings",9/*exPreviewAllowMiddleZoom*/,.F.)
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
72:
Is it possible to display the page number with the same size on the Preview workspace

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:SetProperty("PreviewSettings",0/*exPreviewShowPageNumbers*/,.T.)
		oPrint:SetProperty("PreviewSettings",1/*exPreviewPageNumberFormat*/,"<b><font ;14><out 000000><fgcolor=FFFFFF><%page%></fgcolor></out></font>")
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
71:
How can I prevent zooming the page whe user clicks it
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:SetProperty("PreviewSettings",8/*exPreviewAllowToggleZoom*/,.F.)
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
70:
How can I select/unselect the pages to be printed when user right clicks the page in the preview
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:SetProperty("PreviewSettings",7/*exPreviewAllowUnprintPage*/,.F.)
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
69:
How can I prevent scrolling the pages by drag and drop
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:SetProperty("PreviewSettings",6/*exPreviewAllowDragScroll*/,.F.)
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
68:
How can I prevent scrolling the pages using the mouse wheel
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:SetProperty("PreviewSettings",5/*exPreviewAllowWheelScroll*/,.F.)
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
67:
How can I change the preview's background color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:SetProperty("PreviewSettings",4/*exPreviewBackColor*/,16777215)
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
66:
How do I change the message "The number of pages being loaded is: 100. Do you want to continue

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:UILimitPagesCountMessage := "The number of pages being loaded is: <%count%>. Do you want to continue?"
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
65:
I'm asked every time after 100 pages loaded, to continue. Is there any way to change/prevent that (sample 2)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:UILimitPagesCountMessage := ""
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
64:
I'm asked every time after 100 pages loaded, to continue. Is there any way to change/prevent that (sample 1)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:UILimitPagesCount := -1
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
63:
Is it possible to export/copy the pages to a file (*.emf or any other extension determines the control to save the pages in EMF format)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:CopyTo("C:\Temp\Page%i.emf")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
62:
Is it possible to export/copy the pages to a file (*.pdf, exports the pages to PDF format. The %i flag has no effect if using PDF format, as all pages are saved to a single document)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:CopyTo("C:\Temp\Page.pdf")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
61:
Is it possible to export/copy the pages to a file (*.png, exports the pages to PNG format)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:CopyTo("C:\Temp\Page%i.png")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
60:
Is it possible to export/copy the pages to a file (*.tif *.tiff, exports the pages to TIFF format)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:CopyTo("C:\Temp\Page%i.tiff")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
59:
Is it possible to export/copy the pages to a file (*.gif, , exports the pages to GIF format)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:CopyTo("C:\Temp\Page%i.gif")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
58:
Is it possible to export/copy the pages to a file (*.jpg *.jpe *.jpeg *.jfif, exports the pages to JPEG format)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:CopyTo("C:\Temp\Page%i.jpg")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
57:
Is it possible to export/copy the pages to a file (*.bmp *.dib *.rle, exports the pages to BMP format)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:CopyTo("C:\Temp\Page%i.bmp")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
56:
The Preview is automatically closed after I create the object. Is it possible to close it, when user closes the Preview
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:AutoRelease := .F.
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
55:
How do I change the paper's frame

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PageFrameStyle := 1/*exPageFrameSolid*/
		oPrint:SetProperty("PageFrameColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
54:
How cam I prevent resizing the paper's margins

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:ShowMargins := .F.
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
53:
Is it possible to place the Print and Print Preview window at the bottom of the Z order
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:Foreground := 1
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
52:
Is it possible to place the Print and Print Preview window at the top (sample 2)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:Foreground := -2
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
51:
Is it possible to place the Print and Print Preview window at the top of the Z-order (sample 1)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:Foreground := -1
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
50:
I am using the eXPrint to print my object, but when I print the document a watermark logo is displayed. Is there any way to prevent that
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:RuntimeKey := "XXX"
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
49:
I've noticed that the page starts at 1. Can I change that

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:StartPageNumber := 10
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
48:
Is it possible to display the page count right after the page number

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PageNumberFormat := "<%page%>/<%count%>"
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
47:
How do I encode/decode plain text

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint
	LOCAL sDecode,sEncode

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		sEncode := oPrint:Encode64Text("AAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDD")
		DevOut( "Encoded:" )
		DevOut( Transform(sEncode,"") )
		sDecode := oPrint:Decode64Text(Transform(sEncode,""))
		DevOut( "Decoded:" )
		DevOut( Transform(sDecode,"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
46:
How do I programmatically encode an icon file to BASE64 string (Images)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint
	LOCAL sEncodeIcon

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		sEncodeIcon := oPrint:Encode64Icons("c:\exontrol\images\setup.ico")
		oPrint:Images(sEncodeIcon)
		oPrint:Caption := "This is an icon <img>7</img> loaded from BASE64 encoded string"
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
45:
How do I programmatically encode a picture file to BASE64 string (HTMLPicture)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint
	LOCAL sEncodePicture

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		sEncodePicture := oPrint:Encode64("c:\exontrol\images\zipdisk.gif")
		oPrint:SetProperty("HTMLPicture","pic1",sEncodePicture)
		oPrint:Caption := "This is a picture <img>pic1:96</img> loaded from BASE64 encoded string"
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
44:
How do I find the number of pages
PROCEDURE OnClick(oPrint,ID,SelectedID)
	DevOut( "Pages:" )
	DevOut( Transform(oPrint:PagesCount(),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:Click := {|ID,SelectedID| OnClick(oPrint,ID,SelectedID)} /*Occurs when the user clicks a button in the toolbar.*/

		oPrint:ToolBarFormat := "1001"
		oPrint:SetProperty("ItemCaption",1001/*0x380+exToolBarClose*/,"Pages")
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
43:
How do I specify the range of pages to be printed

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:PageRange := "1,4"
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
42:
My control uses transparency, and so the print and print-preview does not show as on the screen. What can I do
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:AsScreen := .T.
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
41:
How do I get a list of available printers

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		DevOut( oPrint:Printers() )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
40:
Is it possible to assign an extra title or caption to the document

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:ExtraCaption("Left","Left-Title",0,0)
		oPrint:ExtraCaption("Right","Right-Title",0,2)
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
39:
Can I change/customize the toolbar

PROCEDURE OnClick(oPrint,ID,SelectedID)
	DevOut( "Click" )
	DevOut( Transform(ID,"") )
	DevOut( Transform(SelectedID,"") )
RETURN

PROCEDURE OnRefresh(oPrint)
	oPrint:SetProperty("ItemCaption",-201/*0xffffff30+exPage*/,"Printer: <fgcolor=808080>Xerox</fgcolor>")
	oPrint:SetProperty("ItemToolTip",-201/*0xffffff30+exPage*/,"Xerox")
	oPrint:SetProperty("ItemCaption",200/*0xc0+exPrinting*/,"<img>7</img> Orientation: Landscape #1")
	oPrint:SetProperty("ItemToolTip",200/*0xc0+exPrinting*/,"Page Orientation")
	oPrint:SetProperty("ItemCaption",201/*0xc0+exCancel*/,"<img>8</img> Size: Letter\r\nLetter #1\r\nA4#9\r\nA5#11\r\nA6#70")
	oPrint:SetProperty("ItemToolTip",201/*0xc0+exCancel*/,"Paper Size")
	oPrint:SetProperty("ItemCaption",202/*0xc0+exPrintPreview*/,"<img>9</img> <fgcolor 0000FF>Scale <sha ;;0>1 x 1")
	oPrint:SetProperty("ItemToolTip",202/*0xc0+exPrintPreview*/,"Adjust To and Fit-To")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:Click := {|ID,SelectedID| OnClick(oPrint,ID,SelectedID)} /*Occurs when the user clicks a button in the toolbar.*/
		oPrint:Refresh := {|| OnRefresh(oPrint)} /*Notifies your application when the pages are refreshed.*/

		oPrint:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1BGWBQwuwiNFmHRoqxSNE+NRolyCNEeTRohyyND2ZRocziNDOfRoX0SNCmlRoS1CNCGrRoO1yGoYzjWyv9nGz83D/3D83W53e93m/3774j/4j743F47/fXN5nO38ajsoEez60Z2gA7IzXKDIb/7vf6/a8fbjXVjSz9T/rnqWfss2333z4P04H34W55r65/8fL/n+/58vu6SNj2PY8mAV5YFaf5XFcVh/leWJYn+WBaFsf5bj8HJ/nAWI4w9EENQ5C0MQlCkHQhCRXwbA8Eo29z4K1GTbPy+scPw+0buS5D9wDAB8SFAiMumABYFgV6KSW" +;
		"ihZjqFR/nIXxFH+c5aDRKsryjKZ/ydKEmSZJBXRmAEapeHk0H+GM1n+FE3H+D84n+0QLn+B87n+BM9H+Ac+zIlkzLK+Ucx5Qsdv050BH+e1GUXRroyKjZXlmWswH7JZoFWP0LDsGB/m0Ugq0/UNOU8Z9NTBJkJwrGL1vbVz40NQlDxy5dFUYex/nnXZ/nlX0iI4jZYFuXkujuFp/l+R4p1TJZYjuF5/2faNmogZxVD7LsnwsXBgTIWtwT+lYlXIf4gXOf4b3Uf4W3af4SXgf4N3mf4J3sf4GXzcSVXBSsbVpHVZt45chHwf564RXtfnfhh/nbh9gOmGZbj+HkPFdLFnhjJbeIfjp/mYVA85BkTdIhj6KFhTp/m+VozxJDrZlvmcyF8PwlGopmbZwjeZlvfawUHHuA6Jgkh4QeuFHkf52aaf51agf5zaniJcO8f5wlyQOnlsNWuZeWI7BdkBTZGfD+H+e580vtVL7Oh5mbLaWxaeWuXnVrusFxrerCCf5" +;
		"fFeUx/l0PolGsX5BinnKNCxxp/idyB/iLyZ/h3yx/sCGU2zeEHOn+DHQTJxHFcJw3AcFf7eUU3579bIEB0VgtHVzXZ56Zp1ZaqQYhakY5NH+bxUi1hxnE6f5ZboZRSDtXR7YMeNf+hpZ5+cf/leZ5GxnaZpOeB4Xekyf5cEFvxtlGOh/nSXBH6YXJIn+cZSjloCefj+Z2fd9P10+Uo7/oV5oTsnWj3bS65RUA4CwEHpAsf48IHNPaib9XA/4Fj0H+FWDAkSRM9RKOoaKYxZLQV0ciBo9GDDvegP8d48oLQrhbCkeEJoRkPey08aCDRbh9BsmQYItBVLJESFwaowRHBmcWRkMkSR/hciYP8KcTx/rkCUP8IMVV0rrMI2MyAJYeRFGoL+IMQ4fP/K6DZAQ/WkNKH+PGNjs2DsJjTGweMKmGjpjsfdqY5h/hUj5BojJJwAACWELYXY/xaB3BYP8XoiwnsOHirlpo72HDvgsMgUYdR/yWkwO2Sjt5JDthjJm" +;
		"S8hg6gpWkLgXyZBeSrTIMUSQbYjlJldLAjcq1ilnBnHYdI8Izu5l8fZ2UfAqR+JSRmQRK1JqVIoOUcg4X0jqHY08dg8GmDzN4LIPDG5sMbHZNaaU1B0DpHXM8dqS1VyqlYTAN86x/honcP8ME8R/uNCwP8J893JOUTQxYGc/YyAAltP8rYHDxnToMgVSNCVg0KoPH8jUxyXCuRakscI4hxPwHOOof4xRRPohCp4dguGvUha9R+jYoX0DjHOOlrFFkl0SQaRsXdM6BFPpnIUuZJSM06ABTynxJKgU7qCTYV9E1qkPFoHZKA6RmuCGyKMKg/6n1RqY4KpKX6j1FpiRqgJMA7VfH+HGsQ/w11lH/EkMkS4mxPWYEutw/whVxn/V02pS0Dh6SQgxFSDZzixlQhqHTUhnINHNYOwEO6/SpnOg9BqSEXB7rxLWdJW66V1LC+MH74hBWZssWIiwPiV2gI8SCDdQqeVDJuRCzpSB/B/IeRsQAAQ/j+thbK2hGrYh" +;
		"wAdbW2dtbdEqC+PolQEAEEqAePC2txLa3BJJbm3ZGQB2xt6AAcAD7nEZIfdK25D7W2vAAQEA=")
		oPrint:ToolBarFormat := "-1,100,-1,101,102,106,-1,(200/201,-1,202),|,(-1,(-201/(103,-1,104,-1,105))):216"
		oPrint:Options := "FitToPage = 1x1"
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
38:
Can I add or display icons or images in the document's title

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oPrint:SetProperty("HTMLPicture","pic1","c:\exontrol\images\zipdisk.gif")
		oPrint:Caption := "<img>7</img> This is the new <img>pic1</img> document's title"
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
37:
How can I change the icons on the captions / tooltips being shown on the toolbar of the Print and Print-Preview

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:ReplaceIcon(0,-1)
		oPrint:Images("gBJJgBAIGAAHAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbqkQib/rlfsVhslllVelloqdqs8Ps1vuFtsFdt1putxvF0ucrtlRr1/u95wVrt2AvdWvuDxVVxNbxsZx+LyVCw1iyNQyuTzWbzmdz2f0Gh0Wj0ml02n1Gp1Wr1mt12v2Gx2Wz2m1neXwlgyu4p2Zsu8v2BrPAvUt4lP4+94Vc5PD5dL3eF6WHxnPsnNzHWpuR7HQ7Vm7vK6nZ6nhou+rXc7/e8ca81E9HO9vp6dh+PM9e2/X7/n9/z/sWiwfJXAaPJAkSSAAkqUQWnC/nAf5wI2f54QpCZ8H+fCNngOkOI2YAHRAjZAAfEkRxKB6UIQhCNxXFSDxfFiNRcjUSRNGsUQ+D5gA/DY/ngP8JwhIcIwpI0KwrDElQz" +;
		"Dkmw6OkQSjEIHRtFEqyvFMXS1GEty7Lkvy1LExRRHkyx2D8gTTH4/oCA=")
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
36:
Is it possible to change/customize the captions / tooltips being shown on the toolbar of the Print and Print-Preview

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:SetProperty("ItemCaption",2/*exClose*/,"<img>6</img> <fgcolor FF0000><b>Inchide")
		oPrint:SetProperty("ItemToolTip",2/*exClose*/,"Inchide preview")
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
35:
Is it possible somehow to get/set all settings of the printer

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		DevOut( Transform(oPrint:Settings(256/*exAllFields*/),"") )
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
34:
How do I get the current's page size as described in the Paper Size field

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		DevOut( Transform(oPrint:Settings(11/*exFormName*/),"") )
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
33:
How can I get the size of the page, in pixels

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:SetProperty("Settings",0/*exPaperSize*/,9)
		DevOut( "Width (pixels): " )
		DevOut( Transform(oPrint:ClientWidth(),"") )
		DevOut( "Height (pixels): " )
		DevOut( Transform(oPrint:ClientHeight(),"") )
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
32:
How can I get the size of the page, in dots

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:SetProperty("Settings",0/*exPaperSize*/,9)
		DevOut( "Width (dots): " )
		DevOut( Transform(oPrint:Settings(12/*exPaperWidth*/),"") )
		DevOut( "Height (dots): " )
		DevOut( Transform(oPrint:Settings(13/*exPaperHeight*/),"") )
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
31:
How can I display inches instead of millimeters

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:SetProperty("Settings",10/*exDisplayInch*/,0)
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
30:
How can I display millimeters instead of inches

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:SetProperty("Settings",10/*exDisplayInch*/,1)
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
29:
How can I change the paper's bottom margin

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:SetProperty("Settings",9/*exBottomMargin*/,0)
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
28:
How can I change the paper's right margin

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:SetProperty("Settings",8/*exRightMargin*/,0)
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
27:
How can I change the paper's top margin

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:SetProperty("Settings",7/*exTopMargin*/,0)
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
26:
How can I change the paper's left margin

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:SetProperty("Settings",6/*exLeftMargin*/,0)
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
25:
How do I specify the print quality
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		DevOut( Transform(oPrint:Settings(5/*exPrintQuality*/),"") )
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
24:
How do I specify the number of copies
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		DevOut( Transform(oPrint:Settings(4/*exPrinterCopies*/),"") )
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
23:
How do I get the current printer's name

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		DevOut( Transform(oPrint:Settings(3/*exPrinterName*/),"") )
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
22:
How do I change the page's orientation to portrait (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:SetProperty("Settings",2/*exPageOrientation*/,1)
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
21:
How do I change the page's orientation to landscape (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:SetProperty("Settings",2/*exPageOrientation*/,2)
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
20:
How do I change the paper's source
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:SetProperty("Settings",1/*exPaperSource*/,7)
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
19:
How can I change the paper's size to A4

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:SetProperty("Settings",0/*exPaperSize*/,9)
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
18:
How do I change the page's orientation to portrait (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PageOrientation := 1/*exPortrait*/
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
17:
How do I change the page's orientation to landscape (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PageOrientation := 2/*exLandscape*/
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
16:
Is there any Fit-To option for print and print preview

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:Options := "FitToPage = 2 x 2"
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
15:
Is there any Fit-To-Page / Fit-To Tall option for print and print preview

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:Options := "FitToPage = x 2"
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
14:
Is there any Fit-To-Page / Fit-To Wide option for print and print preview

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:Options := "FitToPage = 2 x"
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
13:
Is there any Fit-To-Page / Adjust-To option for print and print preview

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:Options := "FitToPage = 25%"
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
12:
Is there any Fit-To-Page option for print and print preview

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:Options := "FitToPage = On"
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
11:
How can I display the document's title to a different place

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:CaptionAlignment := 0/*exLeft*/
		oPrint:CaptionPosition := 1/*exFooter*/
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
10:
How can I display the page numbers to a different place

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PageNumbersPosition := 0/*exHeader*/
		oPrint:PageNumbersAlignment := 2/*exRight*/
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
9:
How do I hide the page numbers

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:ShowPageNumbers := .F.
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
8:
Is it possible to display the page's index and count in the document's title

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:Caption := "<font ;16>This is the page number <%page%> from <%count%> pages."
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
7:
How do I change the document's title

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:Caption := "<font ;16>This is your new <b>title</b>."
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
6:
How do I programmatically print the control, not using the Print-Preview mainframe

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:DoPrint(.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
5:
How can I print and print-preview the control (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExts := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
4:
How do I get the version of the eXPrint control
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		DevOut( oPrint:Version() )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
3:
How do I change the font to display the page's caption (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:Caption := "<font ;24>Untitled Document"
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2:
How do I change the font to display the page's caption (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:Font():Size := 24
		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1:
How can I print and print-preview the control (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oPrint := XbpActiveXControl():new( oForm:drawingArea )
	oPrint:CLSID  := "Exontrol.Print.1" /*{4DEB0D2B-6EBD-4A22-9835-48AB9CDC8088}*/
	oPrint:create(,, {10,60},{610,370} )

		oPrint:PrintExt := oPrint
		oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN