質問編集履歴
2
Form2の追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -58,7 +58,21 @@
|
|
58
58
|
|
59
59
|
{
|
60
60
|
|
61
|
+
public UserControl1 u1;
|
62
|
+
|
61
63
|
public Form1 f1;
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
public Form2(UserControl1 u)
|
68
|
+
|
69
|
+
{
|
70
|
+
|
71
|
+
InitializeComponent();
|
72
|
+
|
73
|
+
u1 = u;
|
74
|
+
|
75
|
+
}
|
62
76
|
|
63
77
|
|
64
78
|
|
@@ -69,6 +83,8 @@
|
|
69
83
|
InitializeComponent();
|
70
84
|
|
71
85
|
f1 = f;
|
86
|
+
|
87
|
+
|
72
88
|
|
73
89
|
}
|
74
90
|
|
1
リクエストされたことの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -88,6 +88,50 @@
|
|
88
88
|
|
89
89
|
|
90
90
|
|
91
|
+
```UserControl1
|
92
|
+
|
93
|
+
private void ToolStripButton7_Click(object sender, EventArgs e)
|
94
|
+
|
95
|
+
{
|
96
|
+
|
97
|
+
bool Isopen = false;
|
98
|
+
|
99
|
+
foreach (Form u in Application.OpenForms)
|
100
|
+
|
101
|
+
{
|
102
|
+
|
103
|
+
if (u.Name == "Form2")
|
104
|
+
|
105
|
+
{
|
106
|
+
|
107
|
+
Isopen = true;
|
108
|
+
|
109
|
+
u.BringToFront();
|
110
|
+
|
111
|
+
break;
|
112
|
+
|
113
|
+
}
|
114
|
+
|
115
|
+
}
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
if (Isopen == false)
|
120
|
+
|
121
|
+
{
|
122
|
+
|
123
|
+
Form2 form2 = new Form2(this);
|
124
|
+
|
125
|
+
form2.Show();
|
126
|
+
|
127
|
+
}
|
128
|
+
|
129
|
+
}
|
130
|
+
|
131
|
+
```
|
132
|
+
|
133
|
+
|
134
|
+
|
91
135
|
### 試したこと
|
92
136
|
|
93
137
|
textBox1のModifiersはPublicになってます。
|