[Gambas-user] Yet another simple printing question !

Vasilis Kanatas vkanatas13 at ...626...
Thu Mar 20 10:57:36 CET 2014


Hello,
I just jumped into Gambas 3 and my printing procedures that worked fine in
Gambas 2 do not work anymore!
Thus, my question is easy. I want to print a form as it is! With its labels
etc..
I have looked the examples and managed to make a printing routine that only
prints white paper!! Why?
Here's the code:

--------------------------------------------------------------------
Private $hImage As Image


Public Sub Form_Open()
    Me.Center
    Try $hImage = Me.Grab.Image
End

Public Sub Printer1_Draw()

  Dim hImage As Image

  If Not $hImage Then Return
  hImage = $hImage
  Paint.DrawImage(hImage)

End

Public Sub PrintButton_Click()

  If Printer1.Configure() Then Return

  Me.Enabled = False
  Inc Application.Busy
  Printer1.Print
  Dec Application.Busy
  Me.Enabled = True

End
--------------------------------------------------------------------

Thank you!
Vasilis



More information about the User mailing list