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();
                    }
    }
  • 相关阅读:
    数据库模糊查询
    Redis集群简介
    POI导出Excel的三种 workbook的区别
    mysql主从跳过错误
    MySQL server has gone away 问题解决方法
    Redis批量删除key的命令
    Python 3.6学习笔记(一)
    maven项目报错
    使用zabbix监控mysql的三种方式
    postgresql初体验
  • 原文地址:https://www.cnblogs.com/lijinchang/p/1872483.html
Copyright © 2011-2022 走看看