I hava a problem with my listboxes when i print directly my window (the contents of my window).
As i saw from another conversation i made my code like this below:
//start of my code
//me = button, self=window
me.Visible = False
dim g as Graphics
dim mPrinterSetup As New PrinterSetup
mPrinterSetup.Landscape = True
g = OpenPrinterDialog( mPrinterSetup, self)
if g<>nil then
dim p as new Picture( self.Width, self.Height, 32)
self.DrawInto(p.Graphics, 0, 0)
dim gheight as Integer = (g.Width/p.Width*p.Height)
[quote=379898:@George Georgiadis]@Michel Bujardet
The lines of my listbox are not on the right position.[/quote]
You could try to do a screen grab instead. It is possible with MBS plugins (Christian, are you here ?), with screencapture on Mac, or with bitblt on Windows.
Of course. But you dont want to send a screen grab to printer!
If you cant do the layout yourself, maybe look into table examples for our DynaPDF plugin. The plugin can output a table over several pages with repeating header lines and dynamic cell sizes.
I just tried to amend <https://xojo.com/issue/47887> to suggest using your method to implement a functional DrawInto for Windows HTMLViewer, but that pesky feedback crashed in my face and lost the case in the process.