Luke
Luke

Reputation: 2400

Rename Form on Load MSVisual c++

Somebody have an idea how to rename form onLoad? I tried:

private: System::Void General_Load(System::Object^  sender, System::EventArgs^  e) {
         String^ test = "test";
         String^ x= "General: " + test;
         this->Name = x;
         }

but it doesn't work.

Upvotes: 0

Views: 145

Answers (1)

Luke
Luke

Reputation: 2400

I should use this->Text = x; not this->Name = x;

Upvotes: 1

Related Questions