Solved

Print image on form

Posted on 2002-04-23
7
157 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

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