Solved

Print image on form

Posted on 2002-04-23
7
155 Views
Last Modified: 2010-05-02
I am writing a module that will print out checks on a 3 part form.  Its not printing anything fancy but I would like to be able to print a logo in the upper left corner and print "black shaded box" around the legal amount does anyone have any suggestions?  I am using all VB code at the moment to do this and would like to continue in this route if possible.  As always I seem to be in a bind for time so any examples would be appreciated!!!
0
Comment
Question by:dorinda
  • 3
  • 2
  • 2
7 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6964553
For an exaustive use of graphics in VB see www.vbaccelerator.com/vbmedia
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6964554
0
 
LVL 18

Expert Comment

by:Crash2100
ID: 6964647
Printer.CurrentX = 300
Printer.CurrentY = 300
picLogo.AutoSize = True

Dim X As Integer
Dim Y As Integer

X = Printer.CurrentX
Y = Printer.CurrentY

Printer.Line (X - 100, Y - 100)-(picLogo.Width + X + 100, picLogo.Height + Y + 100), vbBlue, BF

Printer.PaintPicture Form1.picLogo, X, Y
Printer.EndDoc
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:dorinda
ID: 6965766
Crash2100, Thanks for your help. That was exactly what I needed on the logo!  Does anyone have any suggestions on the legal amount how I would shade the line or box around it?  I will increase and split points if someone else provides that answer.
0
 
LVL 18

Accepted Solution

by:
Crash2100 earned 150 total points
ID: 6966363
'to change the position of any of the boxes, just use the line statements like this.
'the B at the end means draw a box, and the F means fill that box
'  Printer.Line (intBoxUpperLeftX, intBoxUpperLeftY)-(intBoxLowerRightX, intBoxLowerRightY), intColor, BF


Dim X As Integer
Dim Y As Integer

Printer.CurrentX = 300
Printer.CurrentY = 300

picLogo.BorderStyle = 0
picLogo.AutoSize = True

X = Printer.CurrentX
Y = Printer.CurrentY

Printer.Line (X - 100, Y - 100)-(picLogo.Width + X + 100, picLogo.Height + Y + 100), vbBlue, BF

Printer.PaintPicture picLogo, X, Y

Printer.DrawWidth = 8  'makes the lines thicker

'draws a box around the number amount
X = 5250
Y = 900
Printer.Line (X, Y)-(X + 1100, Y + 280), vbBlue, B


'draws a box around the hand written amount
X = 350
Y = 1200
Printer.Line (X, Y)-(X + 5700, Y + 280), vbBlue, B

Printer.EndDoc
0
 

Author Comment

by:dorinda
ID: 6967050
Thanks...that is exactly what I wanted!!!
0
 
LVL 18

Expert Comment

by:Crash2100
ID: 6967061
glad I could help
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

895 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

13 Experts available now in Live!

Get 1:1 Help Now