rainbow Level: Trainee
 Registered: 01-03-2005 Posts: 1
|
Printing size different from actual setting
Private Sub cmdPrint_Click()
On Error GoTo err
Dim W_Printer As String
Dim Rtn
Dim w As Single
Dim h As Single
Dim x As Integer
Dim i As Integer
If txtMasterAccount.Text >= 0 Then
Rtn = vbYes 'max
' Rtn = MsgBox("Do you wish to print your message on " & StrConv(Printer.DeviceName, vbUpperCase) & " Printer", vbInformation + vbYesNo)
If Rtn = vbYes Then
Set_Printer
MsgBox Printer.DeviceName
If MsgBox("Have you choosen the correct printer?", vbQuestion + vbYesNo, "Printer Details") = vbNo Then
Printer.KillDoc
Else
Printer.Font.Size = 11
Printer.FontBold = True
CommonDialog1.Copies = 1
CommonDialog1.PrinterDefault = True
CommonDialog1.Orientation = cdlPortrait
CommonDialog1.ShowPrinter
For i = 0 To dgCount - 1
DataGrid1.Row = i
'MsgBox DataGrid1.Columns("Usercode").Value
'MsgBox DataGrid1.Columns("Accesskey").Value
Printer.PaperSize = vbPRPSStatement
Printer.CurrentY = 6000
Printer.CurrentX = 1200
Printer.CurrentY = 2000
Printer.Print txtPIC.Text
Printer.CurrentX = 1200
Printer.Print txtCompanyName.Text
Printer.CurrentX = 1200
Printer.Print txtAddr.Text
Printer.CurrentX = 1200
Printer.Print txtAddr1.Text
Printer.CurrentX = 1200
Printer.Print txtAddr2.Text
Printer.CurrentX = 8000
Printer.CurrentY = 3700
Printer.Print DataGrid1.Columns("Usercode").Value
Printer.CurrentX = 8000
Printer.CurrentY = 4500
Printer.Print DataGrid1.Columns("Accesskey").Value
Printer.EndDoc
Next
DataGrid1.Row = 0
Exit Sub
End If
err:
MsgBox err.Description
MsgBox "Printer Site Error"
End If
Else
MsgBox "Select the printer and then try", vbCritical
End If
End Sub
i wish to print a paper size with height = 5.5 inches
and width = 9.5inches.Thus, i have selected the vbPRPSStatement. But the output size is different from 5.5 X 8.5...
May i know how?? 5.5 X 8.5 is height X width or reversely?
The output i get is height 8.5.
Thanks.
|