質問編集履歴
1
更なる情報の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -67,3 +67,201 @@
|
|
67
67
|
|
68
68
|
|
69
69
|
よろしくお願いいたします。
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
----以下追記です
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
InitializeComponent()内はVSが自動的に吐いてくれるソースですので、私は何もいじってないです。
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
一部名前やリテラルを隠させていただきましたが、それ以外は変えてないです。
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
親フォーム
|
94
|
+
|
95
|
+
```C#
|
96
|
+
|
97
|
+
namespace AR
|
98
|
+
|
99
|
+
{
|
100
|
+
|
101
|
+
public partial class Main : Form
|
102
|
+
|
103
|
+
{
|
104
|
+
|
105
|
+
public Main()
|
106
|
+
|
107
|
+
{
|
108
|
+
|
109
|
+
InitializeComponent();
|
110
|
+
|
111
|
+
}
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
private void Main_Load(object sender, EventArgs e)
|
116
|
+
|
117
|
+
{
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
this.textBox1.Text = "changed";
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
}
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
private void button2_Click(object sender, EventArgs e)
|
130
|
+
|
131
|
+
{
|
132
|
+
|
133
|
+
GYM f = new GYM();
|
134
|
+
|
135
|
+
f.ShowDialog();
|
136
|
+
|
137
|
+
Console.Write("フォームが表示されました。");
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
f.Dispose();
|
142
|
+
|
143
|
+
}
|
144
|
+
|
145
|
+
}
|
146
|
+
|
147
|
+
}
|
148
|
+
|
149
|
+
```
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
子フォーム
|
156
|
+
|
157
|
+
```C#
|
158
|
+
|
159
|
+
namespace AR
|
160
|
+
|
161
|
+
{
|
162
|
+
|
163
|
+
public partial class GYM : Form
|
164
|
+
|
165
|
+
{
|
166
|
+
|
167
|
+
public String id;
|
168
|
+
|
169
|
+
public String ID
|
170
|
+
|
171
|
+
{
|
172
|
+
|
173
|
+
set { id = value; }
|
174
|
+
|
175
|
+
get { return id; }
|
176
|
+
|
177
|
+
}
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
private HtmlElementCollection html;
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
public GYM()
|
188
|
+
|
189
|
+
{
|
190
|
+
|
191
|
+
InitializeComponent();
|
192
|
+
|
193
|
+
webBrowser1.Navigate("url");
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
}
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
private void Form1_Load(object sender, EventArgs e)
|
206
|
+
|
207
|
+
{
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
this.button1.Text = "changed";
|
212
|
+
|
213
|
+
this.textBox1.Text = "this";
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
}
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
private void textBox1_TextChanged(object sender, EventArgs e)
|
222
|
+
|
223
|
+
{
|
224
|
+
|
225
|
+
HtmlElementCollection html = this.webBrowser1.Document.All;
|
226
|
+
|
227
|
+
HtmlElementCollection forms = html.GetElementsByName("hoge");
|
228
|
+
|
229
|
+
forms[0].InnerText = textBox1.Text;
|
230
|
+
|
231
|
+
}
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
private void textBox2_TextChanged(object sender, EventArgs e)
|
236
|
+
|
237
|
+
{
|
238
|
+
|
239
|
+
HtmlElementCollection html = this.webBrowser1.Document.All;
|
240
|
+
|
241
|
+
HtmlElementCollection forms = html.GetElementsByName("fuga");
|
242
|
+
|
243
|
+
forms[0].InnerText = textBox2.Text;
|
244
|
+
|
245
|
+
}
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
private void textBox3_TextChanged(object sender, EventArgs e)
|
250
|
+
|
251
|
+
{
|
252
|
+
|
253
|
+
HtmlElement pwd = webBrowser1.Document.GetElementById("hogefuga");
|
254
|
+
|
255
|
+
pwd.InnerText = textBox3.Text;
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
}
|
262
|
+
|
263
|
+
}
|
264
|
+
|
265
|
+
}
|
266
|
+
|
267
|
+
```
|