Link to home
Start Free TrialLog in
Avatar of VBBRett
VBBRett

asked on

How would I send text from a class to a form with a text box

I have a class and I would like to append text that would normally go to a console to a form with a text box.  How would I do this?  

An example of one line I have is

Console.WriteLine("Zero Loan Repayment for " & employeeSSN)

How would I write it to the form with the text box.

form3.textbox1 would be the name of the form and textbox.  Thank you.
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

1) .NET version?

2) For 2003, you could use a Friend scope, and set the value this way:

   Dim frm3 As New Form3
   frm3.textbox1.Text = "Zero Loan Repayment for " & employeeSSN

3) For 2005, you don't need an instance of the form, you would only need this:

   form3.textbox1.Text = "Zero Loan Repayment for " & employeeSSN

Bob
Avatar of VBBRett
VBBRett

ASKER

That's what I did, but how do you skip to the next line after that record of

form3.textbox1.text &= ("Zero Loan Repayment for " & employeeSSN)

How do I break to the next line in the string export?
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can also use the AppendText() function of the TextBox:

    Form3.TextBox1.AppendText("another line to be added" & vbCrLf)