Hello all,

Does VC++ Express 10.0 even support the ability to get text from a text box? I've seen related threads having conflicting solutions, none of which actually work. Ex: must have SDK version x.y. This functionality seems to be so basic and necessary that solutions would be all over the internet.. but they're not. So far, my code is the prefab code generated by VC++ FORMS. All I need is a Yes/No.. and if yes, the name of the method/function/class/object/whateverDoesTheJob and the data/var name. Thanks in advance and apologies if I've gone too far off the reservation.

>>Does VC++ Express 10.0 even support the ability to get text from a text box?
Ask yourself, what's the use of a write-only text box.

CText myText;
CString text = myText.Text; //Property
//Go berserk with text.

In case I wasn't clear - Yes.

c++ Forms

private: System::Windows::Forms::TextBox^  myText;
<snip>
String^ str = myText->Text;

nbaztec.. your comment was the BASIS of my post. Thanks for the snippet.

Works now..tks ancient dragon.

added to form1.h (for 2nd textbox also).

private: System::Void getSearchResults_CurrentChanged(System::Object^  sender, System::EventArgs^  e) 
			 {

					   String ^ boxText1 = richTextBox1->Text;
					   String ^ boxText2 = richTextBox2->Text;

				 //getRichTextBox(/*System::Windows::Forms::RichTextBox^ */ richTextBox1);
			 }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.