By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,995 Members | 1,422 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,995 IT Pros & Developers. It's quick & easy.

Printing in vb.net

P: 13
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
Mar 6 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.