首页 > 代码库 > winForm 程序开发界面参数传递
winForm 程序开发界面参数传递
1.
[csharp] view plaincopy
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WindowsFormsApplication2
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void ButtonClickMethod(object sender, EventArgs e)
- {
- this.nextForm = new Form2(this);
- this.nextForm.Show();
- }
- private Form2 nextForm;
- private void checkBox1_Click(object sender, EventArgs e)
- {
- this.nextForm.Close();
- }
- }
- }
2.
[csharp] view plaincopy
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WindowsFormsApplication2
- {
- public partial class Form2 : Form
- {
- public Form2(Form1 f)
- {
- this.prevForm = f;
- InitializeComponent();
- }
- private Form1 prevForm;
- private void button1_Click(object sender, EventArgs e)
- {
- }
- }
- }
winForm 程序开发界面参数传递
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。