Imports ThoughtWorks.QRCode.Codec; Dim objqrcode As QRCodeEncoder = New QRCodeEncoder Dim imgimage As Image Dim objbitmap As Bitmap Dim s As String s = "Sarfaraz M Bhat Age=10 and Class=30" objqrcode.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE objqrcode.QRCodeScale = 3 objqrcode.QRCodeVersion = 6 objqrcode.QRCodeErrorCorrect = ThoughtWorks.QRCode.Codec.QRCodeEncoder.ERROR_CORRECTION.L imgimage = objqrcode.Encode(s) objbitmap = New Bitmap(imgimage) objbitmap.Save("QRCode.jpg") Pimage.ImageLocation = "QRCode.jpg";
Dim WithEvents PD As New Printing.PrintDocument PD.Print() Private Sub PD_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PD.PrintPage 'e.Graphics.DrawImage(Pimage.Image, e.MarginBounds.Left, e.MarginBounds.Top) e.Graphics.DrawImage(Pimage.Image, Pimage.Bounds) End Sub
Dim file As System.IO.StreamWriter file = My.Computer.FileSystem.OpenTextFileWriter("digimate.txt", False) Dim x As Integer Dim total As Integer file.WriteLine() file.WriteLine() file.WriteLine() file.WriteLine() file.WriteLine() file.WriteLine() file.WriteLine() file.WriteLine() file.WriteLine() file.Write("{0,-9}", "Bill No:") file.Write("{0,-25}", txtbillno.Text) file.Write("{0,10}", "Dated :") file.Write("{0,-22}", dtpick.Text.ToString) file.WriteLine() file.Write("{0,-9}", "Name :") file.Write("{0,-25}", frmcustomer.lblname.Text) file.Write("{0,10}", "Address:") file.Write("{0,-22}", frmcustomer.lbladdress.Text) file.WriteLine() file.Write("{0,-9}", "Contact:") file.Write("{0,-25}", frmcustomer.lblcontact.Text) file.Write("{0,10}", "Email :") file.WriteLine("{0,-22}", frmcustomer.lblemail.Text) file.WriteLine("-----------------------------------------------------------------") file.Write("{0,-7}", "S.NO") file.Write("{0,-30}", "ITEMS ORDERED") file.Write("{0,7}", "RATE") file.Write("{0,7}", "LENGTH") file.Write("{0,7}", "WIDTH") file.WriteLine("{0,7}", "TOTAL") file.WriteLine("-----------------------------------------------------------------") '66 For x = 0 To dgselecteditems.Rows.Count - 1 file.Write("{0,-7}", x + 1) file.Write("{0,-30}", dgselecteditems.Rows(x).Cells("itemname").Value) file.Write("{0,7}", dgselecteditems.Rows(x).Cells("rate").Value) file.Write("{0,7}", dgselecteditems.Rows(x).Cells("length").Value) file.Write("{0,7}", dgselecteditems.Rows(x).Cells("width").Value) file.Write("{0,7}", dgselecteditems.Rows(x).Cells("amount").Value) total += dgselecteditems.Rows(x).Cells("amount").Value file.WriteLine() Next file.WriteLine("-----------------------------------------------------------------") file.Write("{0,-7}", "") file.Write("{0,-30}", "Total Amount =") file.WriteLine("{0,28}", total) file.WriteLine("-----------------------------------------------------------------") file.WriteLine() file.WriteLine() file.WriteLine() file.WriteLine() file.WriteLine() file.Write("{0,58}", "Sales Tax @ 13.5% due :") file.WriteLine("{0,7}", txttaxdue.Text) file.Write("{0,58}", "Sales Tax @ 13.5% charged:") file.WriteLine("{0,7}", txttaxcharged.Text) 'file.WriteLine("------------------------------------------------------------------") file.WriteLine() file.Write("{0,-9}", "Total due:") tc = total + Val(txttaxcharged.Text) ' qrtotal = tc Dim temp As String = RupeesToWord(tc) file.Write("{0,45}", temp) file.Close()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)