Solved

Printing an image and text

Posted on 2002-04-18
5
161 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
ID: 6952763
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
ID: 6954040
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
ID: 6954398
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
ID: 6957170
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
ID: 6957265
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

828 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