Begginer code
I'm trying to write a really easy program, one that will open a new window, with 3 text boxes, 2 buttons and a web browser. First two fields will be for userID and password, and the third, which must initially be unselectable, should be the URL provider for the web browser. The two buttons: Logout and Login. The third text box becomes available only after logging in. Here is the code for the object functions:
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
if(textBox1->Text =="User1" && textBox2->Text =="zxc")
{
textBox3->CanSelect =true;
}
else
{
textBox3->CanSelect =
false;}
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
textBox3->CanSelect =false;
webBrowser1->Url =" ";
}
private: System::Void textBox3_TextChanged(System::Object^ sender, System::EventArgs^ e) {
webBrowser1->Url = textBox3->Text;
}
I'm having problems with textBox3->CanSelect property. As far as I've seen, this is a bool that tells whether the box is or is not selectable by the user. Anyway, when I compile, it says:
error C2039: 'set' : is not a member of 'System::Windows::Forms::Control::CanSelect'
and
see declaration of 'System::Windows::Forms::Control::CanSelect' wherever I try to use it. I can't understand what it wants to say. And, if i can't set the value of CanSelect, then how am I supposed to make a text box from selectable to unselectable?
Sorry for the long post.

