Revolution1200
Programmer
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
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