printing from file
-
trying to print from a file but nothing prints. here is the code.
Private Sub document_PrintPage(ByVal sender As Object, _ ByVal e As System.Drawing.Printing.PrintPageEventArgs) _ Handles docToPrint.PrintPage Dim printFont As New System.Drawing.Font _ ("Arial", 12, System.Drawing.FontStyle.Regular) ' Insert code to render the page here. ' This code will be called when the control is drawn. ' The following code will render a simple ' message on the printed document. If System.IO.File.Exists(SaveFileDialog1.FileName) Then count = 0 menu2 = File.OpenText(SaveFileDialog1.FileName) menu2 = System.IO.File.OpenText(SaveFileDialog1.FileName) Do Until menu2.Peek = -1 menuitem(count) = menu2.ReadLine 'e.Graphics.DrawString(menuitem(count), printFont, _ 'System.Drawing.Brushes.Black, 10, 10) 'e.Graphics.DrawString(writeline(count), printFont, _ 'System.Drawing.Brushes.Black, 10, 10) count = count + 1 Loop For counter = 0 To count e.Graphics.DrawString(menuitem(count), printFont, _ System.Drawing.Brushes.Black, 10, 10) e.Graphics.DrawString(writeline(count), printFont, _ System.Drawing.Brushes.Black, 10, 10) Next counter menu2.Close() End If ' Draw the content. End Sub