Page 1 of 1


Posted: Tuesday 14th January 2020 10:17pm
by sadams54
With the latest update many things changed and no backward compatibility was considered. I have fixed my printing problems with the help of benoit, but one remains.
In the past it worked fine. I set the number of pages for the document in the begin method. The it called the draw as many times as there are pages. each time you end the page with a paint.end command. Problem is now this works for a single page no issue. It crashes on subsequent pages with the error "No current device" on the first command to try to use the paint object. Something has changed. What is the new method to end a page and start the next?

Re: paint.end

Posted: Thursday 16th January 2020 2:46am
by grayghost4
give this a try , it should print three pages :
Public Sub PrintButton_Click()
  If Printer2.Configure() Then Return
  Printer2.Count = 3
  Me.Enabled = False
  Inc Application.Busy
  Dec Application.Busy
  Me.Enabled = True

Public Sub Printer2_Draw()
 Paint.DrawRichText("hello", 300, 300)
 Paint.DrawRichText("page # " &, 400, 600)

Re: paint.end

Posted: Thursday 16th January 2020 7:03pm
by sadams54
Hey, thanks so much. Your answer was a bit wordy but that did the trick.

You could simplify the answer for others by just saying to eliminate the paint.end command and it all works.

Looks like the paint.end command is no longer needed.

Thanks again for the help.