• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

Printing with VB

How can I print (to printer) with VB6?
I have a GRID or some text with column...

Thanks

Beny
0
Beny
Asked:
Beny
  • 3
1 Solution
 
andcuCommented:
I would pass your info to something like Crystal Reports then print from there.  Or there is a Printer object you can use.
0
 
TimCotteeCommented:
The simple method is to use the printer object:

Printer.Print text1.text

Printer.CurrentX = 500
Printer.CurrentY = 1000

Printer.Print "Hello Again"

You can print a grid using something similar to

Printer.PaintPicture DBGrid1.CaptureImage, 100, 100

Then use
Printer.EndDoc

to output the job. Hope this helps.
0
 
TimCotteeCommented:
The simple method is to use the printer object:

Printer.Print text1.text

Printer.CurrentX = 500
Printer.CurrentY = 1000

Printer.Print "Hello Again"

You can print a grid using something similar to

Printer.PaintPicture DBGrid1.CaptureImage, 100, 100

Then use
Printer.EndDoc

to output the job. Hope this helps.
0
 
TimCotteeCommented:
beny, did andcu's answer really help you? If so fair enough, I personally cannot see that there was enough info in his/her response.
0
 
hatinaCommented:
The most easy is using Crystal Report,
where you can define template of your
page at printer.
Crystal Report works only with data from database (I guess,its true too in VB6),but you can save your data in any
temp working database to fulfil it.
The other way ,you must compute and set coordinate in printer , where you will put your texts, or lines (to grid)
There are PRINTER properties SCALE...,
and methods Current.. to do it.

The last way, is use some shareware OCX.
www.geocities.com/ResearchTriangle/6311/ppreview.htm 
for example



0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now