hi,
i am developing a vb application to print a bill using printer object.i have developed the whole application but while executing it showns an error(runtime error '380': invalid property value.please help me to do it.
my codes are:
Private Sub Command1_Click()
MousePointer = 11 'mouse pointer busy while printing
Printer.PaperSize = vbPRPSUser
Printer.ScaleMode = vbTwips
'Printer.Height = 19
'Printer.Width = 23.7
Printer.Font.Name = "arial" ' ( contained within quotes)
Printer.Font.Size = 12 ' (no quotes)
Printer.CurrentX = 2160
Printer.CurrentY = 720
Printer.Print txtDoffice
Printer.CurrentX = 3600
Printer.CurrentY = 1440
Printer.Print txtdate
Printer.CurrentX = 3960
Printer.CurrentY = 2880
Printer.Print txtfromaddress
Printer.CurrentX = 4320
Printer.CurrentY = 10800
Printer.Print txtfrom
Printer.CurrentX = 4680
Printer.CurrentY = 2880
Printer.Print txttoaddress
Printer.CurrentX = 5400
Printer.CurrentY = 10800
Printer.Print txtto
Printer.CurrentX = 7200
Printer.CurrentY = 720
Printer.Print txtpackage
Printer.CurrentX = 7200
Printer.CurrentY = 2880
Printer.Print txtdesc
Printer.CurrentX = 7200
Printer.CurrentY = 6120
Printer.Print txtactual
Printer.CurrentX = 7200
Printer.CurrentY = 7560
Printer.Print txtcharged
Printer.CurrentX = 7200
Printer.CurrentY = 9360
Printer.Print txtrates
Printer.CurrentX = 7200
Printer.CurrentY = 10800
Printer.Print txtrs
Printer.CurrentX = 7200
Printer.CurrentY = 12960
Printer.Print txtps
Printer.EndDoc 'tells printer object you are done printing to it and it can print.
MousePointer = 0
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyF12
MsgBox "Success"
End Select
End Sub
need in urgency