Solved

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

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

Bob
0
 
LVL 85

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

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…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

777 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