Solved

Printing an image and text

Posted on 2002-04-18
5
159 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
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…

773 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