?
Solved

Printing with VB

Posted on 2000-04-13
5
Medium Priority
?
187 Views
Last Modified: 2010-05-02
How can I print (to printer) with VB6?
I have a GRID or some text with column...

Thanks

Beny
0
Comment
Question by:Beny
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 

Accepted Solution

by:
andcu earned 100 total points
ID: 2711279
I would pass your info to something like Crystal Reports then print from there.  Or there is a Printer object you can use.
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 2711287
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
 
LVL 43

Expert Comment

by:TimCottee
ID: 2711293
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
 
LVL 43

Expert Comment

by:TimCottee
ID: 2711301
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
 

Expert Comment

by:hatina
ID: 2711786
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question