[Gambas-user] Printing Forms

Ken Schrock schrockk at ...137...
Thu May 22 21:14:46 CEST 2003


Here is a workaround for what I wanted to do
(only drawback is that ImageMagick must be present)
I have set the title of the Form to MyForm1

PUBLIC SUB PrintButton_Click()

  DIM foobar AS printer
  DIM mypic AS picture

  printer.size = 2
  mypic = NEW picture
  EXEC "import -window MyForm1 /tmp/grab.jpg" WAIT
  mypic.load("/tmp/grab.jpg")
  Draw.begin(printer)
  Draw.picture(mypic)
  Draw.end

END

If you want the window decorations also, you just add -frame

-- 
Using Lindows 






More information about the User mailing list