回答編集履歴
1
回答したコードで動作しなかったため更新
test
CHANGED
@@ -36,7 +36,7 @@
|
|
36
36
|
|
37
37
|
|
38
38
|
|
39
|
-
public Form2(UserControl1 u, Form1
|
39
|
+
public Form2(UserControl1 u, Form1 myParent)
|
40
40
|
|
41
41
|
{
|
42
42
|
|
@@ -44,7 +44,7 @@
|
|
44
44
|
|
45
45
|
u1 = u;
|
46
46
|
|
47
|
-
f1 =
|
47
|
+
f1 = myParent;
|
48
48
|
|
49
49
|
}
|
50
50
|
|
@@ -96,9 +96,9 @@
|
|
96
96
|
|
97
97
|
{
|
98
98
|
|
99
|
-
Form1
|
99
|
+
Form1 myParent = (Form1)this.ParentForm;
|
100
100
|
|
101
|
-
Form2 form2 = new Form2(this,
|
101
|
+
Form2 form2 = new Form2(this, myParent);
|
102
102
|
|
103
103
|
form2.Show();
|
104
104
|
|