[Year 12 Its] VB.NET questions

Frank Van Den Boom vandenboomfj at aquinas.vic.edu.au
Thu Jun 8 12:37:45 EST 2006


I am currently retraining myself from very basic VB to very basic VB.NET.  A question for more experienced VB.NET people out there...

To print a formatted table with a string (eg aword) in column 1, integer (eg. i) in column 2, and integer in column 3 (eg i^2), VB6 can do it as follows, where picOutput is a picture box or a form.

picOutput.print aword, i, i^2

In VB.NET, the best I can do so far using a rich text box (txt1) is as follows. It seems the Print command is no longer supported in the previous form.

txt1.Text = txt1.Text + aword.padright(15, " ") + CStr(i).PadLeft(4, " ") + CStr(i ^ 2).PadLeft(6, " ") + vbCrLf

Can anyone suggest a simpler approach that is closer to the VB6 statement?
While there's some good learning in understanding this statement for students, talk about trying to crack a walnut with a sledgehammer......

Frank



More information about the is mailing list