Solved

Print image on form

Posted on 2002-04-23
7
156 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
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…

777 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