zoukankan      html  css  js  c++  java
  • winform 利用属性在父、子窗体间传值

    父窗口:
    public   partial     class   wc_DanChen   :   Form
            {
                    public   int   userID;
                    public   wc_DanChen()
                    {
                            InitializeComponent();
                    }
                    private   void   Form1_Load(object   sender,   EventArgs   e)
                    {
                            wc_NewYard   NewForm   =   new   wc_NewYard(this);          
                            NewForm.show();
                    }
    }

    子窗口
    public   partial   class   wc_NewRoll   :   Form
            {
                    private   wc_NewYard   frmParent;

                    public   wc_NewRoll(wc_NewYard   parent)
                    {
                            InitializeComponent();
                            frmParent   =   parent;
                    }
                    private   void   button3_Click(object   sender,   EventArgs   e)
                    {
                            frmParent.userID   =   " ";
                            this.close();
                    }
    }
  • 相关阅读:
    bzoj1711
    bzoj1458
    bzoj1433
    hdu2732
    bzoj1066
    hdu3549
    poj1698
    [ZJOI2007]时态同步
    SA 学习笔记
    [LUOGU]2016 Sam数
  • 原文地址:https://www.cnblogs.com/lijinchang/p/1872483.html
Copyright © 2011-2022 走看看