call variable from another form c#

后端 未结 3 1052
时光说笑
时光说笑 2020-12-12 04:24

I have a DataGridView in Form1 and I\'m using this code to display another form called Generator:

private void button1         


        
3条回答
  •  情歌与酒
    2020-12-12 05:14

    The easiest way from there is to open the designer for the DataGridView (myDataGridView) on Form1 and set the Modifiers property from private to internal or public

    This will let you call myForm.myDataGridView from the Generator form.

提交回复
热议问题