zhangzujin 发表于 2005-12-31 21:27

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

<P>建立windows应用程序,拖入两个textBox。<BR><BR>加入代码如下:<BR><BR>private: System::Void Form1_Load(System::Object *  sender, System::EventArgs *  e)<BR>    {<BR>     textBox1-&gt;MaxLength=8;<BR>     textBox1-&gt;PasswordChar='*';<BR>     textBox1-&gt;CharacterCasing=CharacterCasing::Upper;<BR>     textBox1-&gt;TextAlign=HorizontalAlignment::Center;<BR>    }<BR><BR><BR>private: System::Void textBox1_TextChanged(System::Object *  sender, System::EventArgs *  e)<BR>    {<BR>     textBox2-&gt;Text=textBox1-&gt;Text;<BR>    }<BR><BR>就这样。</P>


页: [1]

编程论坛