Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click Dim prndoc As PrintDocument = New PrintDocument prndoc.DocumentName = Text AddHandler prndoc.PrintPage, AddressOf Me.Paper_PrintBill prndoc.Print() prndoc.Dispose() End Sub Public Sub Paper_PrintBill(ByVal obj As Object, ByVal e As PrintPageEventArgs) Dim printFont4 As Font = New Font("Verdana", 10) e.Graphics.DrawString("B.No: " & txtreceiptno.Text, printFont4, Brushes.Black, 10, 20) e.Graphics.DrawString(DateTime.Now.ToString("dd/MM/yyyy"), printFont4, Brushes.Black, 10, 50) End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)