Click here to Skip to main content
15,888,208 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Vb6 Installer Pin
Rizwan Chattha27-Dec-15 1:26
Rizwan Chattha27-Dec-15 1:26 
QuestionComma, ')', or a valid expression continuation expected Pin
gauravsaraogi2115-Dec-15 3:41
gauravsaraogi2115-Dec-15 3:41 
AnswerRe: Comma, ')', or a valid expression continuation expected Pin
CHill6015-Dec-15 5:24
mveCHill6015-Dec-15 5:24 
Questionhow to display marker on digital map with mapwingis VB.NET Pin
joerwanto14-Dec-15 22:57
joerwanto14-Dec-15 22:57 
QuestionRe: how to display marker on digital map with mapwingis VB.NET Pin
CHill6015-Dec-15 5:14
mveCHill6015-Dec-15 5:14 
QuestionPrinting invoice in CRSTAL report 8.5 in DOT MATRIX Printer in roll Paper Pin
imagetvr12-Dec-15 20:59
imagetvr12-Dec-15 20:59 
AnswerRe: Printing invoice in CRSTAL report 8.5 in DOT MATRIX Printer in roll Paper Pin
Dave Kreskowiak13-Dec-15 5:17
mveDave Kreskowiak13-Dec-15 5:17 
QuestionPrinting invoice in Continuous stationery in usb dot matrix in VB6 Pin
imagetvr12-Dec-15 21:31
imagetvr12-Dec-15 21:31 
C#
I am developing a sample project in Visual basic 6 and MS Access 2003.

1.	I wish to  print Invoice in Continuous statonery (Roll Paper ) width of paper 5.5 inches
I am using printer.print Code using (x,y) co-ordinates

My problem , after printing one bill printer skips and giving lot of space between two bills. My aim printer must stop printing after completing one bill. ( no gaps required ) and user tear off that bill and continue to print  next bill.

I am printing invoice in DOT MATRIX PRINTER (USB )

My code is

Dim cy As Long
Dim cx As Long
Dim cx1 As Long
Dim tmpval As Double

Set rs = New ADODB.Recordset
sql = "select * from del_head where tran=" & Trim(txtcustno.Text) & ""
rs.Open sql, CN, adOpenStatic, adLockPessimistic
If rs.RecordCount > 0 Then

cno = rs(2)
custname = rs(3)
ctown = rs(8)

Set rs3 = New ADODB.Recordset
rs3.Open "select sum(amountdue)-sum(amountrec) from receipt_d where cid = " & cno & "", CN, adOpenStatic, adLockPessimistic
custdue = rs3(0)
rs3.Close


Printer.Font = "Arial"
Printer.FontBold = True
Printer.FontSize = 12
Printer.CurrentX = 3400
Printer.CurrentY = 50
Printer.Print " XXXXXXXXXXXXXXXX "
Printer.Font = "Arial"
Printer.FontBold = False
Printer.FontSize = 10
Printer.CurrentX = 3400
Printer.CurrentY = 350
Printer.Print "  XXXXXXXXXXXXXXXXXXXXX  "
Printer.Font = "Arial"
Printer.FontBold = False
Printer.FontSize = 11
Printer.CurrentX = 2600
Printer.CurrentY = 650
Printer.Print "  XXXXXXXXXXXXXXXXXXXX "
Printer.Font = "Arial"
Printer.FontBold = False
Printer.FontSize = 11
Printer.CurrentX = 3300
Printer.CurrentY = 950
Printer.Print "  XXXXXXXXXXXXXXXXXXXX "

Printer.Font = "Arial"
Printer.FontBold = False
Printer.FontSize = 9
Printer.CurrentX = 6400
Printer.CurrentY = 50
Printer.Print "  XXXXXXXXXXXXXXXX "

Printer.Font = "Arial"
Printer.FontBold = False
Printer.FontSize = 9
Printer.CurrentX = 6400
Printer.CurrentY = 200
Printer.Print "      :   XXXXXXXXXXXXXXXX "

Printer.Font = "Arial"
Printer.FontBold = False
Printer.FontSize = 9
Printer.CurrentX = 6350
Printer.CurrentY = 550
Printer.Print "    XXXXXXXXXXXXXXXX"


Printer.CurrentX = 1000
Printer.CurrentY = 1150
Printer.FontSize = 9
Printer.Print " Bill No : " & rs(1)

Printer.CurrentX = 3600
Printer.CurrentY = 1150
Printer.FontSize = 8
Printer.Print " INVOICE "

Printer.CurrentX = 6150
Printer.CurrentY = 1150
Printer.FontSize = 9
Printer.Print "  Date : " & rs(4)

Printer.Line (1000, 1400)-(7800, 1400) '-h line

'Printer.Line (20, 10)-(20, 18800) 's1
'Printer.Line (11520, 10)-(11520, 18800) 's2
'Printer.Line (10, 18800)-(11500, 18800) 'bl

Printer.Font = "DCI + Tml + Ismail"
Printer.CurrentX = 100
Printer.CurrentY = 1550
Printer.Print "           tpguk;                     fp          tpiy             bjhif"

Printer.Line (1000, 1800)-(7800, 1800) '-h line




cy = 2000
cx = 6500
Set rs1 = New ADODB.Recordset
sql = "select * from del_det where transno=" & Trim(txtcustno.Text) & ""
rs1.Open sql, CN, adOpenStatic, adLockPessimistic
Do While Not rs1.EOF


Printer.Font = "DCI + Tml + Ismail"
Printer.CurrentX = 1100
Printer.CurrentY = cy
Printer.Print rs1(3)

Printer.Font = "Arial"
Printer.FontSize = 10

Printer.CurrentX = 3500
Printer.CurrentY = cy
Printer.FontSize = 9
Printer.Print rs1(4)


Printer.CurrentX = 4700 - TextWidth(rs1(5))
Printer.CurrentY = cy
Printer.Print Format(rs1(5), "00.00")

Printer.CurrentX = cx - TextWidth(rs1(6))
Printer.CurrentY = cy
Printer.Print Format(rs1(6), "00.00")


'Format$(123,"@@@@@@")

rs1.MoveNext
cy = cy + 250
Loop
Printer.Line (6000, cy)-(7800, cy) '-h line

Printer.Font = "DCI + Tml + Ismail"
Printer.CurrentX = 4500
Printer.CurrentY = cy + 100
Printer.FontSize = 10
Printer.Print " bkhj;jk; "

Printer.Font = "Arial"
Printer.CurrentX = cx - TextWidth(rs(7))
Printer.CurrentY = cy + 100
Printer.FontSize = 10
Printer.Print Format(rs(7), "00.00")
cy = cy + 300
Printer.Line (6000, cy)-(7800, cy) '-h line

Printer.Font = "DCI + Tml + Ismail"
Printer.CurrentX = 4500
Printer.CurrentY = cy + 300
Printer.FontSize = 10
Printer.Print " bkhj;j ghf;fp "

Printer.Font = "Arial"
Printer.CurrentX = cx - TextWidth(custdue)
Printer.CurrentY = cy + 300
Printer.FontSize = 10
Printer.Print Format(custdue, "00.00")
cy = cy + 600
Printer.Line (6000, cy)-(7800, cy)   '-h line
Printer.EndDoc
End If

AnswerRe: Printing invoice in Continuous stationery in usb dot matrix in VB6 Pin
Dave Kreskowiak13-Dec-15 5:12
mveDave Kreskowiak13-Dec-15 5:12 
QuestionVB.NET DUPLICATE SCREEN SHARING PROBLEM Pin
Steve Roseik12-Dec-15 7:58
Steve Roseik12-Dec-15 7:58 
GeneralRe: VB.NET DUPLICATE SCREEN SHARING PROBLEM Pin
CHill6013-Dec-15 2:36
mveCHill6013-Dec-15 2:36 
GeneralRe: VB.NET DUPLICATE SCREEN SHARING PROBLEM Pin
Steve Roseik13-Dec-15 8:06
Steve Roseik13-Dec-15 8:06 
GeneralRe: VB.NET DUPLICATE SCREEN SHARING PROBLEM Pin
CHill6013-Dec-15 8:15
mveCHill6013-Dec-15 8:15 
GeneralRe: VB.NET DUPLICATE SCREEN SHARING PROBLEM Pin
Steve Roseik20-Dec-15 7:31
Steve Roseik20-Dec-15 7:31 
QuestionUsing Await Pin
jkirkerx10-Dec-15 14:02
professionaljkirkerx10-Dec-15 14:02 
AnswerRe: Using Await Pin
CHill6012-Dec-15 4:02
mveCHill6012-Dec-15 4:02 
GeneralRe: Using Await Pin
jkirkerx12-Dec-15 13:57
professionaljkirkerx12-Dec-15 13:57 
GeneralRe: Using Await Pin
CHill6013-Dec-15 2:35
mveCHill6013-Dec-15 2:35 
AnswerWell here's what I ended up with Pin
jkirkerx13-Dec-15 12:30
professionaljkirkerx13-Dec-15 12:30 
QuestionLINQ group By Pin
byka8-Dec-15 4:58
byka8-Dec-15 4:58 
QuestionBuild this as a separate project within the project Pin
jkirkerx7-Dec-15 11:18
professionaljkirkerx7-Dec-15 11:18 
AnswerRe: Build this as a separate project within the project Pin
Wombaticus7-Dec-15 11:33
Wombaticus7-Dec-15 11:33 
GeneralRe: Build this as a separate project within the project Pin
jkirkerx7-Dec-15 11:59
professionaljkirkerx7-Dec-15 11:59 
GeneralRe: Build this as a separate project within the project Pin
Wombaticus7-Dec-15 12:08
Wombaticus7-Dec-15 12:08 
GeneralRe: Build this as a separate project within the project Pin
jkirkerx8-Dec-15 12:30
professionaljkirkerx8-Dec-15 12:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.