Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2006-06-19
4
Medium Priority
?
203 Views
Last Modified: 2010-04-23
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.
0
Comment
Question by:VBBRett
  • 2
4 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16935770
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
0
 

Author Comment

by:VBBRett
ID: 16935967
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?
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 2000 total points
ID: 16936036
form3.textbox1.text &= "Zero Loan Repayment for " & employeeSSN & vbCrLf

Bob
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 16936887
You can also use the AppendText() function of the TextBox:

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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Integration Management Part 2
Screencast - Getting to Know the Pipeline
Suggested Courses

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question