Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scanned image view printing

Status
Not open for further replies.

Revolution1200

Programmer
Sep 29, 2005
143
GB
Hi,

Cant beleive the mess i am getting into with this...

I have an app that the user can view scanned images - A4 Application form pages.

The user then clicks in the picture box to indicate where reference numbers should appear and prints.

When printed though the text is never in the correct position and the image appears enlarged.

Have tried setting everything to twips, millimeters and so on.

Basically if anyone can help me with printing the a4 image as A4 then that would give me a hand.

Current Code

Private Sub Form_Load()
Dim myPic As StdPicture
Set myPic = LoadPicture("c:\scannedImage.jpg")

Picture1.Picture = myPic
Picture1.Left = 0
Picture1.Top = 0
Picture1.Width = myPic.Width
Picture1.Height = myPic.Height
End Sub

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Picture1.CurrentX = Round(x, 0)
Picture1.CurrentY = Round(y, 0)
Picture1.Print "X"

edtX = x
edtY = y
End Sub

Private Sub DoPrint(PrintDevice As Object)

If TypeOf PrintDevice Is PictureBox Then
PrintDevice.Width = Printer.ScaleWidth
PrintDevice.Height = Printer.ScaleHeight
End If

PrintDevice.ScaleMode = vbTwips

PrintDevice.CurrentX = edtX
PrintDevice.CurrentY = edtY

PrintDevice.Print "X"

If TypeOf PrintDevice Is Printer Then
Printer.EndDoc
End If

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top