Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing in VB 6.0, .Print Function problems

Status
Not open for further replies.

istill316

Programmer
Jun 21, 2004
2
US
I'm having a problem with the printer for a program I've created. I have to recreate a data table on a page to be printed. Earlier today it worked fine; however, I am now having an odd problem: every time I execute the Printer.Print command, it the program spools the print job. Restarting my computer did not help.
According to everything I've been reading all afternoon, this should not happen. The .Print command simply should draw the text on the image of the printer object, not actually print it. Executing the .NewPage and .EndDoc methods are supposed to be the only way to actually print.
As an alternative, I can print all of the text to a form and then print the form with its .PrintForm method; however, this does not yield anywhere near as high a quality of product as using the Printer object does.
Any help would be greatly appreciated.

Thanks,

R. Parks
 
Its hard to say without seeing any code. Are you controlling
the vertical and horz. spacing?

Printer.Print CurrentX
Printer.Print CurrentY

 
Here's some code:

Option Explicit

Private Sub Form_Load()

With Printer

.ScaleMode = 2 'Point

.FontName = "Arial"
.FontBold = True
.FontSize = 20
.CurrentX = 19
.CurrentY = 20

Printer.Print "My Title"

.EndDoc

End With

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top