-
January 30th, 2021, 08:38 PM
#1
Copy textbox data to a string
// I have a textBox and would like to copy its contents
// into a string called myColor
string myColor= "BLUE"; // OK works as expected
textBoxColor->Text = "BLUE"; // OK The textbox accepts a string literal
// But ... none of the following seems to work - all have errors
myColor = textBoxColor->Text;
myColor = textBoxColor.Text;
myColor = std::string( textBoxColor->Text);
myColor = System::String(textBoxColor->Text);
myColor = Convert.ToString(textBoxColor->Text);
myColor = System::Convert::ToString(textBoxColor->Text);
myColor = String::Parse(textBoxColor->Text);
myColor = textBoxColor->Text;
// ------------ Suggestions please
// Bob
-
January 31st, 2021, 04:31 AM
#2
Re: Copy textbox data to a string
Originally Posted by srfpala
...
// ------------ Suggestions please
// Bob
I'd suggest you to post your question to the appropriate forum.
Your code has nothing to with the Visual C++ Programming!
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|