how to set paper size by write code in vb 6.0

Hi Vb Master I made a project for sales, I made sale bill problem is how can i set the paper size by code in vb 6.0 i use ado and database sql how can i calculat the measurment for paper in vb 6.0 what is pixels and how can write code through it also what is chr (...)+ chr (....) + chr (..) can you tell me every possible knowledge for reset paper size and how can i adjust the line in paper to print like :- Customer Name :- Jayesh Patel but print like this Customer name :- -----------------Jayesh Patel, how can i set in one line here is my code :- Private Sub cmdPrint_Click() Call SbillPrint(reqText1.Text) End Sub Public Sub SbillPrint(printtofile As Boolean) Dim VappPath As String VappPath = Fs.GetFolder(App.Path).ShortPath '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 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 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 Please answer as possible as soon Thanking You Jayesh Patel

Add new comment