小弟在一个事件中写下如下代码,目的是创建一个textBox,但是程序总是不能实现,请各位大侠赐教。
TextBox^ mytextBox = gcnew TextBox;
mytextBox->Visible = true;
mytextBox->Location = System::Drawing::Point(1, 1);
mytextBox->Name = L"mytextBox";
mytextBox->Size = System::Drawing::Size(71, 21);
mytextBox->TabIndex = 1;
textBox1->Visible = true;
mytextBox->Show();
TextBox^ mytextBox = gcnew TextBox;
mytextBox->Visible = true;
mytextBox->Location = System::Drawing::Point(1, 1);
mytextBox->Name = L"mytextBox";
mytextBox->Size = System::Drawing::Size(71, 21);
mytextBox->TabIndex = 1;
textBox1->Visible = true;
mytextBox->Show();
textBox1->Visible = true;
重复了,应该只有一个。