如登录的用户名为手机号码,登录成功后跳转到另一个窗体,进入到这个窗体后,窗体上的一个文本框中就会显示登录时的手机号码
4条回答 默认 最新
- threenewbee 2018-10-17 13:14关注
给你写了一个
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Q702950 { public partial class LoginDialog : Form { public string telnum = ""; public LoginDialog() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { telnum = textBox1.Text; Close(); } } } using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Q702950 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { LoginDialog dlg = new LoginDialog(); dlg.ShowDialog(); textBox1.Text = dlg.telnum; } } }
完整代码:https://download.csdn.net/download/caozhy/10728196
因为csdn的限制,最低设置1分,如果你没有分,或者不想浪费积分,采纳本回答,留下邮箱,发给你。
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 3无用 4