Hi, how should modify this vb6 code to .net? Ive read through some articles and websites regarding printing in vb.net, but im cant seems to understand them and its confusing me.
Private Sub WriteHeader()
Dim t As String
Dim p As Integer
Printer.FontSize = 10
t = "Userid: " & gUserID
Printer.CurrentY = 1440
Printer.CurrentX = 1440
Printer.Print t;
t = "Carlsberg Marketing Sdn. Bhd."
p = (Printer.Width - Printer.TextWidth(t)) / 2
Printer.CurrentX = p
Printer.Print t;
Printer.CurrentX = Printer.Width - 2880
Printer.Print Format(Now, "short date");
Printer.Print " " & Format(Now, "HH:MM")
t = "Wholesalers' Van Advertisement Credit Notes Listing"
p = (Printer.Width - Printer.TextWidth(t)) / 2
Printer.CurrentX = p
Printer.Print t;
Printer.CurrentX = Printer.Width - 2880
Printer.Print "Page No. " & Printer.Page
Printer.Print
Printer.Print , "No.", "S/Office", "Customer ", "Name"
Printer.Print , , "CN No.", , "Narration", , , "Amount"
Printer.Print
End Sub
Please help.
Many thanks