[开源]Vc.Net教程1——密码文本框
建立windows应用程序,拖入两个textBox。
加入代码如下:
private: System::Void Form1_Load(System::Object * sender, System::EventArgs * e)
{
textBox1->MaxLength=8;
textBox1->PasswordChar='*';
textBox1->CharacterCasing=CharacterCasing::Upper;
textBox1->TextAlign=HorizontalAlignment::Center;
}
private: System::Void textBox1_TextChanged(System::Object * sender, System::EventArgs * e)
{
textBox2->Text=textBox1->Text;
}
就这样。