- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
-
- namespace WindowsFormsApplication3
- {
- public partial class Form1 : Form
- {
- public static string username;
- public Form2 form2 = null; //定义窗体
- public Form1()
- {
- InitializeComponent();
- }
-
- private void Form1_Load(object sender, EventArgs e)
- {
-
- }
-
- private void button3_Click(object sender, EventArgs e)
- {
- username = "123456";
- MessageBox.Show(username);
-
- if (form2 == null) //判断窗体是否存在
- {
- form2 = new Form2();
- form2.Show();
- this.Hide();
- }
-
-
-
- }
- }
-
- }

![[手游] 三网H5小游戏【少年仙路】WIN系服务端+Linux手工服务端+详细搭建教程](https://cdn.jxasp.com:9143/image/20260615/136BC33AA47EB0D84E878835A8B38FDB.png)

















