Solved

Printing an image and text

Posted on 2002-04-18
5
157 Views
Last Modified: 2010-05-02
Hello,


I am printing an image in the upper left hand corner of a page.  I am using Printer.PaintPicture to accomplish this.  The image is about 1"X 1".  My problem is that I also need to print text to the right of the image on the uppermost part of the page.

With Printer.PaintPicture the printer moves down about 1".  How would I, or can I, go about printing back up the page?

Thanks.

Mike
             
             
0
Comment
Question by:MichaelVB
5 Comments
 
LVL 3

Expert Comment

by:leojl
Comment Utility
hi,

I was going to say that you can dictate the x,y coordinates to print, but then I looked again at the question...

You should not try to print a picture and then try to back up for printing... You must get both picture and text all togather before you send it to the printer.

leo
0
 
LVL 22

Accepted Solution

by:
rspahitz earned 100 total points
Comment Utility
I don't see why you can't set the coordinates:

Printer.CurrentX = Printer.ScaleX(Image1.Picture.width, vbHiMetric, vbPixels)
Printer.CurrentY = 0

The "line movement" occurs within the spooler buffer, so it should cause no problems.  When the buffer is ready to print, just Printer.EndDoc.
0
 
LVL 18

Expert Comment

by:mdougan
Comment Utility
You might be able to leave the Printer.CurrentX alone, as I think that it might have moved to the right of the image after printing.  But then, as rspahitz suggests, set the CurrentY back to zero will take you back to the top of the page.
0
 

Author Comment

by:MichaelVB
Comment Utility
Thanks for the input guys.  I actually need to print this image in each corner of the page.  I am printing a type of certificate with some artwork/designs for asthetics in each corner.  As of yet, I have not had time to give  these suggestions a try.  Given this extra information, do they still apply.

Thanks again,

Mike

0
 
LVL 18

Expert Comment

by:mdougan
Comment Utility
Well, if you're printing to the printer object, you will likely be controling when you move to a new page.  So, at the start of each new page, you just print your image and text, then position the CurrentX and CurrentY down the page to continue with your printing.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now