Home >Database >Mysql Tutorial >简单委托:在主窗口F1点击菜单打开另一个子窗口F2时,将主窗口te

简单委托:在主窗口F1点击菜单打开另一个子窗口F2时,将主窗口te

WBOY
WBOYOriginal
2016-06-07 15:43:591323browse

简单委托:在主窗口F1点击菜单打开另一个子窗口F2时,将主窗口textBox传至子窗口的textBox 主窗体F1写代码: int autoid = Convert.ToInt32(txtEditAutoId.Text.Trim()); DZD_Input dzd = new DZD_Input(autoid); dzd.Show(); 子窗体F2写代码: public DZD_I

简单委托:在主窗口F1点击菜单打开另一个子窗口F2时,将主窗口textBox值传至子窗口的textBox值

主窗体F1写代码:

  int autoid = Convert.ToInt32(txtEditAutoId.Text.Trim());
            DZD_Input dzd = new DZD_Input(autoid);
            dzd.Show();

 

子窗体F2写代码:

        public DZD_Input(int autoid)
            :this()
        {
            this.txtEditAutoId.Text = autoid.ToString();
        }       

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn