回答編集履歴
1
回答に追記
answer
CHANGED
@@ -2,4 +2,30 @@
|
|
2
2
|
|
3
3
|
comboBox.Parent = this; //MainFormの上で出すなら
|
4
4
|
|
5
|
-
その他、Locationとかも設定してやらないと。
|
5
|
+
その他、Locationとかも設定してやらないと。
|
6
|
+
|
7
|
+
---
|
8
|
+
ソースが修正されてワケワカメに。
|
9
|
+
んじゃ最初から。
|
10
|
+
|
11
|
+
・新規にプロジェクト作成、VisualC#>Windowsフォームアプリケーションを選択
|
12
|
+
・ソースに以下を追加
|
13
|
+
```C#
|
14
|
+
public partial class Form1 : Form
|
15
|
+
{
|
16
|
+
public Form1()
|
17
|
+
{
|
18
|
+
InitializeComponent();
|
19
|
+
|
20
|
+
ComboBox cb = new ComboBox();
|
21
|
+
cb.Items.Add("aaaa");
|
22
|
+
cb.Items.Add("bbbb");
|
23
|
+
cb.Items.Add("cccc");
|
24
|
+
cb.Parent = this;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
```
|
28
|
+
・で実行すると、
|
29
|
+

|
30
|
+
|
31
|
+
・バッチシ!
|