Solved

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

Posted on 2006-06-19
4
189 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
Comment Utility
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
Comment Utility
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 500 total points
Comment Utility
form3.textbox1.text &= "Zero Loan Repayment for " & employeeSSN & vbCrLf

Bob
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
Comment Utility
You can also use the AppendText() function of the TextBox:

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

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now