Printing in pre printed paper using visual basic
Bill Size
Height : 6 inches Width of paper : 9.1 inches
I am using
OS = Windows XP
Visual Basic Enterprise Edition 6
I wish to print bill by bill, Pre printed stationery is continious paper,
the problem is : while printing the paper moves for A4/Letter and i cann't able to enable the Tear off Mode.
I am enclosing three codes please rectify my errors :
First code using vb printing
Private Function printmethod()
Dim cy As Long
Dim cx As Long
Dim tmpval As Double
Printer.ScaleMode = ScaleModeConstants.vbTwips
Printer.Width = 13104
Printer.Height = 8640
Printer.CurrentX = 9360
2. Second code creating Text file and printing
Public Function txtprint()
Dim bno As String
Dim bdate As String
cname = cnametxt.Text
bdate = datetxt.Text
place = cptxt.Text
bno = Bnotxt.Text
Call modBillPrinter.OpenPrintFile
Call modBillPrinter.PrintPLine(Chr(12))
12))
psno = 1
While psno <= sno
If tcount > 5 Then
Print #1, Chr(12)
Call Header
tcount = 1
End If
mg1.Row = psno
mg1.Col = 2: particulars = mg1.Text
tcount = tcount + 1
psno = psno + 1
Wend
For i = 1 To 9 - tcount
Print #1, vbCr
Next i
Print #1, Spc(5); "Discount : "; disctxt.Text; Spc(5); "VAT : "; vattxt.Text
Print #1, vbCr
Print #1, Spc(76 - Len(CStr(Netamttxt.Text))); Netamttxt.Text
Print #1, Chr(12)
modBillPrinter.ClosePrintReport
Shell App.Path & "\PRINT.BAT", vbHide
End Function
End Function
A.Senthil kumar

