Solved

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

Posted on 2006-06-19
4
198 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
UDP Data Capture Thread Issue 7 44
VB.Net Data Class 1 48
Learning About The VB.NET TableLayoutPanel Control 5 42
Adding Rows to Grid 4 33
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 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