注册 登录
编程论坛 VC.NET论坛

[开源]Vc.Net教程1——密码文本框

zhangzujin 发布于 2005-12-31 21:27, 1238 次点击

建立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;
}

就这样。

0 回复
1