[Question]GUI Intereface Input Text.

06/08/2010 10:00 Øblivion#1
Hey, needing help on my source(USES GUI) i made it GUI but i don't understand how do i do the input text?

Like elite-coemu it starts up server and when u press start it inputs the text in the text box

Like
so if i put console.writeline("Bleh");
Or
Database.LoadMobs;

I want it to input that text in the text box any ideas?
06/08/2010 11:34 .Summer#2
is a windowsform right?
06/08/2010 14:55 Basser#3
Code:
if (textBox1.Text; == "Bleh")
If you want it to read the text.
Code:
textBox1.AppendText(Console.ReadLine);
If you want to write the console's text. (I doubt this lol.)

Just random guesses, I never use WindowsForms
06/08/2010 20:28 Øblivion#4
Quote:
Originally Posted by .Summer View Post
is a windowsform right?
What part of GUI don't you understand?

@Basser would that even work?
06/08/2010 22:59 s.bat#5
You can direct the input and output of the System.Console class through its SetOut(TextWriter) and SetIn(TextReader) methods. One solution could be to create classes that extend both System.IO.TextWriter and System.IO.TextReader, and take a System.Windows.Forms.TextBoxBase, and implement the abstract and override the virtual methods to read and append text to the TextBoxBase object through its Text member and other methods.
06/08/2010 23:24 kinshi88#6
Quote:
Originally Posted by s.bat View Post
You can direct the input and output of the System.Console class through its SetOut(TextWriter) and SetIn(TextReader) methods. One solution could be to create classes that extend both System.IO.TextWriter and System.IO.TextReader, and take a System.Windows.Forms.TextBoxBase, and implement the abstract and override the virtual methods to read and append text to the TextBoxBase object through its Text member and other methods.
I highly doubt he understood anything you said =P

Just make a rich text box, right click it, properties.
Now around the top you'll see the value Name, that's like the variable name for it.
richTextBox1.Text += "Hello\n";