Share Your Source Code or Article

Do you have source code, articles, tutorials, web links, and books to share? You can write your own content here. You can even have your own blog.

Submit now...

Database Programming Made Easy

This tutorial will teach you step by step on how to connect and manipulate database. If you'd like to suggest a tutorial please write a comment at the bottom of this article.

Read more...

Hire Us to Do Your Work

Do you want a customized system? Do you want to setup your own website to do business? Then we are here to help you in your programming needs.

Read more...

Search

undaerstand chr (27) + chr (64) and set paper size manualy by coding in vb


hi

please help me again

what is chr (27) and like chr (xx..)

what dose it means

how can i stop ejecting paper from printer after complete print lines

i use txt file and edit.com to see what is to be print

let me know every thing about chr (27) like code

how can i set paper size with chr help in vb 6.0 codeing

please let me know if possible as soon

thanking you

jayesh patel



reset paper size in vb 6.0

hi vb master
hello again

i made a programe for sale bill

i want print the curretnt data which show on vb 6.0 forum

i use chr (27) + chr (67) to reset paper

now the probelm is

customer nname :- jayesh patel will print like this but actully it dosn';t print as shown
it print like customer name:-
jayesh patel now how can i set like above

thanking you

admin's picture

re: reset paper size in vb 6.0

Sorry but I didn't get what you mean. Can you explain it a little bit?

hi vb master here is my

hi vb master

here is my code

Public Sub SbillPrint(printtofile As Boolean)
'bill page size :-
'Height :- 10.02 CM starting Edge to perforater
'Width :- 25.0 CM
Dim cn As New ADODB.Connection
qry = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source = " & App.Path & "\jay medicin.mdb"
cn.Open qry
Dim Rs1 As New ADODB.Recordset
Dim Items As Integer
Dim i As Integer
Dim MaxItems As Integer
MaxItems = 11
Items = 1
Rs1.Open "select * from sale_particulars ", cn, adOpenKeyset, adLockOptimistic
Set t = Fs.OpenTextFile(VappPath & "\SBill.Txt", ForWriting, True)
If Not (Rs1.EOF And Rs1.BOF) Then

t.Write Chr(27) + Chr(67) + Chr(12.03) + Chr(27) + Chr(77) ' items = 6 hoy tyare print mate ni size

Start:

t.WriteLine Space(31) & (Rs1!bill_no)
t.WriteLine LPad(Rs1!pat_name, 31) & Space(25) & Rs1!bill_date
t.WriteLine Space(20) & Rs1!dr_name
t.WriteBlankLines 1
If Rs1!bill_no = reqText1.Text Then
Do While Rs1!bill_no = reqText1.Text
t.WriteLine Space(2) & RPad(CStr(Rs1!item_Name), 35) & _
RPad(CStr(Rs1!batch), 15) & _
RPad(CStr(Rs1!Expiry), 10) & _
RPad(CStr(Rs1!p_rate), 10) & _
RPad((Rs1!S_Rate), 7) & ""
Rs1.MoveNext
If Items < MaxItems Then
For i = 0 To MaxItems - 1
Next i
End If

Items = Items + 1

If Rs1.EOF = False And Items > MaxItems Then
t.WriteLine Space(8) & RPad("", 24) & Space(11) & RPad("", 10) & Space(14) & LPad("Cont...", 15)
t.Write Chr(12)
Items = 1
If Rs1!bill_no <> reqText1.Text Then
Exit Do
End If
t.Write Chr(27) + Chr(67) + Chr(24.07) + Chr(27) + Chr(77) ' items = 6 hoy tyare print mate ni size
GoTo Start
End If

If Rs1!bill_no <> reqText1.Text Then
Exit Do
End If

Loop
End If
t.Write Chr(12)
End If
t.Close
Rs1.Close

If printtofile = True Then
Shell VappPath & "\Edit.Com " & VappPath & "\sBill.Txt", vbMaximizedFocus
Else
Shell VappPath & "\p1.bat " & Fs.GetFile(VappPath & "\sBill.Txt").ShortPath, vbHide
End If

Set t = Nothing
Set Fs = Nothing

End Sub

admin's picture

As you mentioned in your

As you mentioned in your previous comment:

now the probelm is

customer nname :- jayesh patel will print like this but actully it dosn';t print as shown
it print like customer name:-
jayesh patel now how can i set like above

You mean the output became:

customer name:-
jayesh patel

and not

customer name :- jayesh patel?

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <java>, <java5>, <javascript>, <mysql>, <php>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • You may use [inline:xx] tags to display uploaded files or images inline.
  • Links to specified hosts will have a rel="nofollow" added to them.

  • You may insert videos with [video:URL]

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.

Step by Step Java Tutorial

In this tutorial you will learn how to program with Java. It has a rich of information to be educated well with Java.

Read more...

Do You Have Question?

Do you have any question related to computer programming? Visit our forum and post new topic on the category you like. Be gentle when asking a question.

Ask now...

Point of Sale

Point of Sale is very useful especially for supermarkets or restaurants. I have included a barcode scanner in this program. Please check it out.

Read more...