Working with Forms in MC++

G

Guest

Hi,

I have a simple form in my Managed C++ application that has a textbox on it that is meant to act like a console. The textbox is updated with information as the program runs. My problem is that a VB textbox does not recognize C++ escape characters and I want to display a newline in the textbox. Do I have to use the VB ControlChars to achieve this or is there a better way? And if so, how to I include them in MC++?

Thank you,
Tim
 
B

borhan

Timwrote:
Hi,
I have a simple form in my Managed C++ application that has a
textbox on it that is meant to act like a console. The textbox is
updated with information as the program runs. My problem is that a
VB textbox does not recognize C++ escape characters and I want to
display a newline in the textbox. Do I have to use the VB
ControlChars to achieve this or is there a better way? And if so,
how to I include them in MC++?
Thank you,
Tim

Hi Tim,

Please try the following line, it should solve your problem.

textBox1->Text = String::Concat( textBox1->Text,
"\r\n", S"SecondLine" );

cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top