|
-
Jun 18th, 2011, 02:38 AM
#4
Lively Member
Re: Garbled printing from compiled app
Try this...This will print the same in both ide/compiled
Private Sub Command1_Click()
Dim sx, sy, px, py As Double
Dim cury As Long
sx = Screen.TwipsPerPixelX
sy = Screen.TwipsPerPixelY
px = Printer.TwipsPerPixelX
py = Printer.TwipsPerPixelY
px = sx / px
py = sy / py
Printer.ScaleMode = 1
Printer.Orientation = 1
Printer.Font.Name = "Arial"
Printer.Font.Bold = True
Printer.Font.Size = 12
Printer.Print ""
Printer.CurrentX = 200 + (200 * px)
Printer.CurrentY = 200 + (200 * py)
Printer.Print "Supplier"
cury = Printer.CurrentY + Printer.TextHeight("B")
Printer.Font.Bold = False
Printer.Font.Size = 10
Printer.CurrentX = 200 + (200 * px)
Printer.CurrentY = cury
Printer.Print "KK Supply"
Printer.EndDoc
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|