When I saw this post in the forum, I feel interesting, I realized it. In fact, the high people before this issue wrote the article. It seems to be net_lover, not very clear.
code show as below:
Using system; using system.windows.form; class test {form fm = new form (); button btnok = new button (); textbox txtpsw = new textbox (); static void main (string [] args) {test temp = New test (); temp.showfrm (); ///console.readline ();} private void showfrm () {btnok.text = "OK"; frm.text = "Land"; txtpsw.location = new system.drawing .Point (10, 10); btnok.location = new system.drawing.point (txtpsw.left, txtpsw.top txtpsw.Height 10); btnok.click = new system.eventhandler (btnokClick); frm.formorderstyle = FormBorderStyle.FixedDialog; frm.Controls.Add (txtPsw); frm.Controls.Add (btnOK); frm.StartPosition = FormStartPosition.CenterScreen; frm.ShowDialog ();} private void btnOKClick (object sender, System.EventArgs e) {// Verify information messagebox.show (txtpsw.text);}}