質問編集履歴
6
修正しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
-
##分からない事
|
1
|
+
##分からない事、試した事
|
2
2
|
|
3
|
+
|
4
|
+
|
5
|
+
新規作成から
|
6
|
+
|
3
|
-
```
|
7
|
+
```Form1
|
4
8
|
|
5
9
|
Imports System.ComponentModel
|
6
10
|
|
@@ -8,27 +12,7 @@
|
|
8
12
|
|
9
13
|
Public Class Form1
|
10
14
|
|
11
|
-
Private ReadOnly list As New Dictionary(Of String, Integer)
|
12
|
-
|
13
15
|
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
14
|
-
|
15
|
-
list.Add("a", 0)
|
16
|
-
|
17
|
-
list.Add("b", 0)
|
18
|
-
|
19
|
-
ComboBox1.DisplayMember = "key"
|
20
|
-
|
21
|
-
ComboBox1.ValueMember = "value"
|
22
|
-
|
23
|
-
ComboBox1.DataSource = New BindingSource(list, Nothing)
|
24
|
-
|
25
|
-
ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList
|
26
|
-
|
27
|
-
End Sub
|
28
|
-
|
29
|
-
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
|
30
|
-
|
31
|
-
TextBox1.Text = ComboBox1.SelectedValue.ToString
|
32
16
|
|
33
17
|
|
34
18
|
|
@@ -38,55 +22,11 @@
|
|
38
22
|
|
39
23
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
40
24
|
|
41
|
-
Form2.Show()
|
42
|
-
|
43
|
-
End Sub
|
44
|
-
|
45
|
-
End Class
|
46
25
|
|
47
26
|
|
27
|
+
If ListBox1.SelectedIndex = 0 Then
|
48
28
|
|
49
|
-
```
|
50
|
-
|
51
|
-
Form2
|
29
|
+
Form2.Show()
|
52
|
-
|
53
|
-
```ここに言語を入力
|
54
|
-
|
55
|
-
Imports System.ComponentModel
|
56
|
-
|
57
|
-
Imports System.Globalization
|
58
|
-
|
59
|
-
Public Class Form2
|
60
|
-
|
61
|
-
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
End Sub
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
70
|
-
|
71
|
-
Me.Hide()
|
72
|
-
|
73
|
-
End Sub
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
78
|
-
|
79
|
-
If Form1.ComboBox1.SelectedIndex = 0 Then
|
80
|
-
|
81
|
-
PictureBox1.Image = My.Resources.A00
|
82
|
-
|
83
|
-
End If
|
84
|
-
|
85
|
-
If Form1.ComboBox1.SelectedIndex = 1 Then
|
86
|
-
|
87
|
-
PictureBox1.Image = My.Resources.A01
|
88
|
-
|
89
|
-
|
90
30
|
|
91
31
|
End If
|
92
32
|
|
@@ -96,25 +36,13 @@
|
|
96
36
|
|
97
37
|
```
|
98
38
|
|
99
|
-
Form1とForm2を新規作成してやった所できました。?
|
100
|
-
|
101
|
-
それで、今作っているソースコードは長いのでこちらには書けません。
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
##試したこと
|
106
|
-
|
107
|
-
作っているプロジェクトのForm1の名前と画像表示のForm2の名前があります。
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
```
|
39
|
+
```Form2
|
112
40
|
|
113
41
|
Imports System.ComponentModel
|
114
42
|
|
115
43
|
Imports System.Globalization
|
116
44
|
|
117
|
-
Public Class Form
|
45
|
+
Public Class Form2
|
118
46
|
|
119
47
|
Private ReadOnly list As New Dictionary(Of String, Integer)
|
120
48
|
|
@@ -122,15 +50,13 @@
|
|
122
50
|
|
123
51
|
Private ReadOnly list2 As New Dictionary(Of String, Integer)
|
124
52
|
|
125
|
-
Private Sub
|
53
|
+
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
|
126
54
|
|
127
|
-
|
55
|
+
TextBox1.Text = ComboBox1.SelectedItem.ToString
|
128
56
|
|
129
|
-
list.Add("a", 0)
|
130
57
|
|
131
|
-
list1.Add("b",0)
|
132
58
|
|
133
|
-
|
59
|
+
End Sub
|
134
60
|
|
135
61
|
Private Sub R00_CheckedChanged(sender As Object, e As EventArgs) Handles R00.CheckedChanged
|
136
62
|
|
@@ -164,25 +90,43 @@
|
|
164
90
|
|
165
91
|
End If
|
166
92
|
|
167
|
-
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
168
|
-
|
169
|
-
|
93
|
+
End Sub
|
170
94
|
|
171
95
|
|
172
96
|
|
97
|
+
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
list.Add("a", 0)
|
102
|
+
|
103
|
+
list1.Add("b", 0)
|
104
|
+
|
105
|
+
list2.Add("c", 0)
|
106
|
+
|
107
|
+
ComboBox1.DisplayMember = "key"
|
108
|
+
|
109
|
+
ComboBox1.ValueMember = "value"
|
110
|
+
|
111
|
+
ComboBox1.DataSource = New BindingSource(list, Nothing)
|
112
|
+
|
113
|
+
ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList
|
114
|
+
|
115
|
+
end sub
|
116
|
+
|
117
|
+
Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click
|
118
|
+
|
119
|
+
Form3.Show()
|
120
|
+
|
173
121
|
End Sub
|
122
|
+
|
123
|
+
End Class
|
174
124
|
|
175
125
|
```
|
176
126
|
|
177
|
-
|
127
|
+
```Form3
|
178
128
|
|
179
|
-
```ここに言語を入力
|
180
|
-
|
181
|
-
Imports System.ComponentModel
|
182
|
-
|
183
|
-
Imports System.Globalization
|
184
|
-
|
185
|
-
Public Class Form
|
129
|
+
Public Class Form3
|
186
130
|
|
187
131
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
188
132
|
|
@@ -194,17 +138,15 @@
|
|
194
138
|
|
195
139
|
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
196
140
|
|
197
|
-
If Form
|
141
|
+
If Form2.ComboBox1.SelectedIndex = 0 Then
|
198
142
|
|
199
143
|
PictureBox1.Image = My.Resources.A00
|
200
144
|
|
201
145
|
End If
|
202
146
|
|
203
|
-
If Form
|
147
|
+
If Form2.ComboBox1.SelectedIndex = 1 Then
|
204
148
|
|
205
149
|
PictureBox1.Image = My.Resources.A01
|
206
|
-
|
207
|
-
|
208
150
|
|
209
151
|
End If
|
210
152
|
|
@@ -214,48 +156,12 @@
|
|
214
156
|
|
215
157
|
```
|
216
158
|
|
217
|
-
新規
|
159
|
+
新規で試した結果画像表示されました。
|
218
160
|
|
219
|
-
|
161
|
+
ブレークモードも確認しましたが何も問題なく、一つずつすべてのコードを確認
|
220
162
|
|
221
|
-
全部の画像は217枚をPicturebox1(Form2)のプロパティのimageに入れました。
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
何処も問題なく、何が原因で表示されないのか不明で困ってます。
|
230
|
-
|
231
|
-
Form2でIfをいれなげれば画像は表示されます。
|
232
|
-
|
233
|
-
ただ、
|
234
|
-
|
235
|
-
If Form1.Combobox1.selectedIndex=0 then
|
236
|
-
|
237
|
-
PictureBox1.Image=My.Resouces.A00
|
238
|
-
|
239
|
-
このようにソースコード書いています。
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
画像貼り付けた状態です。
|
244
|
-
|
245
|
-
エラーなどはありません。
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
プロジェクトがおかしいのが?全く分からないです。
|
250
|
-
|
251
|
-
もう一度作り直す?しがないんでしょうか?
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
163
|
+
しました。
|
256
164
|
|
257
165
|
##バージョンなど
|
258
166
|
|
259
|
-
Vistual
|
167
|
+
Vistual studio2017
|
260
|
-
|
261
|
-
VisualBasic
|
5
test
CHANGED
File without changes
|
test
CHANGED
@@ -122,7 +122,7 @@
|
|
122
122
|
|
123
123
|
Private ReadOnly list2 As New Dictionary(Of String, Integer)
|
124
124
|
|
125
|
-
Private Sub
|
125
|
+
Private Sub form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
126
126
|
|
127
127
|
|
128
128
|
|
@@ -222,7 +222,7 @@
|
|
222
222
|
|
223
223
|
|
224
224
|
|
225
|
-
|
225
|
+
|
226
226
|
|
227
227
|
|
228
228
|
|
4
文字の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -122,6 +122,16 @@
|
|
122
122
|
|
123
123
|
Private ReadOnly list2 As New Dictionary(Of String, Integer)
|
124
124
|
|
125
|
+
Private Sub Dishes_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
list.Add("a", 0)
|
130
|
+
|
131
|
+
list1.Add("b",0)
|
132
|
+
|
133
|
+
list2.Add("c",0)
|
134
|
+
|
125
135
|
Private Sub R00_CheckedChanged(sender As Object, e As EventArgs) Handles R00.CheckedChanged
|
126
136
|
|
127
137
|
If R00.Checked = True Then
|
3
文字の修正しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,10 +1,6 @@
|
|
1
|
-
こんばんは。
|
2
|
-
|
3
|
-
以前投稿させていただいた物です。
|
4
|
-
|
5
|
-
##
|
1
|
+
##分からない事
|
6
|
-
|
2
|
+
|
7
|
-
```ここにを入力
|
3
|
+
```ここに言語を入力
|
8
4
|
|
9
5
|
Imports System.ComponentModel
|
10
6
|
|
@@ -14,80 +10,180 @@
|
|
14
10
|
|
15
11
|
Private ReadOnly list As New Dictionary(Of String, Integer)
|
16
12
|
|
13
|
+
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
14
|
+
|
15
|
+
list.Add("a", 0)
|
16
|
+
|
17
|
+
list.Add("b", 0)
|
18
|
+
|
19
|
+
ComboBox1.DisplayMember = "key"
|
20
|
+
|
21
|
+
ComboBox1.ValueMember = "value"
|
22
|
+
|
23
|
+
ComboBox1.DataSource = New BindingSource(list, Nothing)
|
24
|
+
|
25
|
+
ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList
|
26
|
+
|
27
|
+
End Sub
|
28
|
+
|
29
|
+
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
|
30
|
+
|
31
|
+
TextBox1.Text = ComboBox1.SelectedValue.ToString
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
End Sub
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
40
|
+
|
41
|
+
Form2.Show()
|
42
|
+
|
43
|
+
End Sub
|
44
|
+
|
45
|
+
End Class
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
```
|
50
|
+
|
51
|
+
Form2
|
52
|
+
|
53
|
+
```ここに言語を入力
|
54
|
+
|
55
|
+
Imports System.ComponentModel
|
56
|
+
|
57
|
+
Imports System.Globalization
|
58
|
+
|
59
|
+
Public Class Form2
|
60
|
+
|
61
|
+
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
End Sub
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
70
|
+
|
71
|
+
Me.Hide()
|
72
|
+
|
73
|
+
End Sub
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
78
|
+
|
79
|
+
If Form1.ComboBox1.SelectedIndex = 0 Then
|
80
|
+
|
81
|
+
PictureBox1.Image = My.Resources.A00
|
82
|
+
|
83
|
+
End If
|
84
|
+
|
85
|
+
If Form1.ComboBox1.SelectedIndex = 1 Then
|
86
|
+
|
87
|
+
PictureBox1.Image = My.Resources.A01
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
End If
|
92
|
+
|
93
|
+
End Sub
|
94
|
+
|
95
|
+
End Class
|
96
|
+
|
97
|
+
```
|
98
|
+
|
99
|
+
Form1とForm2を新規作成してやった所できました。?
|
100
|
+
|
101
|
+
それで、今作っているソースコードは長いのでこちらには書けません。
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
##試したこと
|
106
|
+
|
107
|
+
作っているプロジェクトのForm1の名前と画像表示のForm2の名前があります。
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
```ここに言語を入力
|
112
|
+
|
113
|
+
Imports System.ComponentModel
|
114
|
+
|
115
|
+
Imports System.Globalization
|
116
|
+
|
117
|
+
Public Class Form1
|
118
|
+
|
119
|
+
Private ReadOnly list As New Dictionary(Of String, Integer)
|
120
|
+
|
17
121
|
Private ReadOnly list1 As New Dictionary(Of String, Integer)
|
18
122
|
|
19
123
|
Private ReadOnly list2 As New Dictionary(Of String, Integer)
|
20
124
|
|
21
|
-
Private Sub
|
125
|
+
Private Sub R00_CheckedChanged(sender As Object, e As EventArgs) Handles R00.CheckedChanged
|
22
|
-
|
23
|
-
|
126
|
+
|
24
|
-
|
25
|
-
list.add("b",1)
|
26
|
-
|
27
|
-
|
127
|
+
If R00.Checked = True Then
|
28
|
-
|
29
|
-
|
128
|
+
|
30
|
-
|
31
|
-
ComboBox1.DisplayMember = "key"
|
32
|
-
|
33
|
-
ComboBox1.ValueMember = "value"
|
34
|
-
|
35
|
-
ComboBox1.DataSource = New BindingSource(list, Nothing)
|
129
|
+
ComboBox1.DataSource = New BindingSource(list, Nothing)
|
36
|
-
|
37
|
-
|
130
|
+
|
38
|
-
|
39
|
-
end sub
|
40
|
-
|
41
|
-
'以前投稿させていただいたコードです
|
42
|
-
|
43
|
-
```
|
44
|
-
|
45
|
-
##エラー
|
46
|
-
|
47
|
-
なし
|
48
|
-
|
49
|
-
##画像表示させたいコード
|
50
|
-
|
51
|
-
```ここに言語を入力
|
52
|
-
|
53
|
-
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
54
|
-
|
55
|
-
Foam2.Show()
|
56
|
-
|
57
|
-
If ComboBox1.SelectedIndex = 0 Then
|
58
|
-
|
59
|
-
Foam2.PictureBox1.Image = My.Resources.A00
|
60
|
-
|
61
|
-
End If
|
131
|
+
End If
|
132
|
+
|
62
|
-
|
133
|
+
End Sub
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
Private Sub R01_CheckedChanged(sender As Object, e As EventArgs) Handles R01.CheckedChanged
|
138
|
+
|
63
|
-
If
|
139
|
+
If R01.Checked = True Then
|
64
|
-
|
140
|
+
|
65
|
-
|
141
|
+
ComboBox1.DataSource = New BindingSource(list1, Nothing)
|
66
|
-
|
142
|
+
|
67
|
-
End If
|
143
|
+
End If
|
68
|
-
|
144
|
+
|
69
|
-
End Sub
|
145
|
+
End Sub
|
70
|
-
|
71
|
-
|
146
|
+
|
72
|
-
|
147
|
+
|
148
|
+
|
73
|
-
|
149
|
+
Private Sub R02_CheckedChanged(sender As Object, e As EventArgs) Handles R02.CheckedChanged
|
74
|
-
|
75
|
-
|
76
|
-
|
150
|
+
|
77
|
-
|
151
|
+
If R02.Checked = True Then
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
152
|
+
|
83
|
-
|
153
|
+
ComboBox1.DataSource = New BindingSource(list2, Nothing)
|
84
|
-
|
154
|
+
|
85
|
-
|
155
|
+
End If
|
86
|
-
|
87
|
-
'Form2のコード
|
88
156
|
|
89
157
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
90
158
|
|
159
|
+
Jsnewr.Show()
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
End Sub
|
164
|
+
|
165
|
+
```
|
166
|
+
|
167
|
+
画像表示のForm
|
168
|
+
|
169
|
+
```ここに言語を入力
|
170
|
+
|
171
|
+
Imports System.ComponentModel
|
172
|
+
|
173
|
+
Imports System.Globalization
|
174
|
+
|
175
|
+
Public Class Form2
|
176
|
+
|
177
|
+
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
178
|
+
|
179
|
+
Me.Hide()
|
180
|
+
|
181
|
+
End Sub
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
186
|
+
|
91
187
|
If Form1.ComboBox1.SelectedIndex = 0 Then
|
92
188
|
|
93
189
|
PictureBox1.Image = My.Resources.A00
|
@@ -98,86 +194,58 @@
|
|
98
194
|
|
99
195
|
PictureBox1.Image = My.Resources.A01
|
100
196
|
|
101
|
-
|
102
|
-
|
103
|
-
End
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
```
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
```ここに言語を入力
|
152
|
-
|
153
|
-
'Form2
|
154
|
-
|
155
|
-
'Button1
|
156
|
-
|
157
|
-
Form1.combobox1.selectIndex=0
|
158
|
-
|
159
|
-
PictureBox1.Image = My.Resources.A00
|
160
|
-
|
161
|
-
```
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
Foam2からボタンを押して画像が表示されるようにしたい。
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
度々申し訳ございません。
|
172
|
-
|
173
|
-
よろしくお願いいたします。
|
174
|
-
|
175
|
-
|
197
|
+
|
198
|
+
|
199
|
+
End If
|
200
|
+
|
201
|
+
End Sub
|
202
|
+
|
203
|
+
End Class
|
204
|
+
|
205
|
+
```
|
206
|
+
|
207
|
+
新規作成してみたんですがちゃんと画像表示もされており・・・
|
208
|
+
|
209
|
+
今作っているプロジェクトだとなぜが画像が表示されません。
|
210
|
+
|
211
|
+
全部の画像は217枚をPicturebox1(Form2)のプロパティのimageに入れました。
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
![画像](0441e3c26f58eda91fcb52a5e7ee4822.jpeg)
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
何処も問題なく、何が原因で表示されないのか不明で困ってます。
|
220
|
+
|
221
|
+
Form2でIfをいれなげれば画像は表示されます。
|
222
|
+
|
223
|
+
ただ、
|
224
|
+
|
225
|
+
If Form1.Combobox1.selectedIndex=0 then
|
226
|
+
|
227
|
+
PictureBox1.Image=My.Resouces.A00
|
228
|
+
|
229
|
+
このようにソースコード書いています。
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
画像貼り付けた状態です。
|
234
|
+
|
235
|
+
エラーなどはありません。
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
プロジェクトがおかしいのが?全く分からないです。
|
240
|
+
|
241
|
+
もう一度作り直す?しがないんでしょうか?
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
よろしくお願いします。
|
176
246
|
|
177
247
|
##バージョンなど
|
178
248
|
|
179
|
-
Vistual
|
249
|
+
Vistual Studio2019
|
180
|
-
|
250
|
+
|
181
|
-
Vis
|
251
|
+
VisualBasic
|
182
|
-
|
183
|
-
windows10 64bit
|
2
test
CHANGED
File without changes
|
test
CHANGED
@@ -70,11 +70,13 @@
|
|
70
70
|
|
71
71
|
```
|
72
72
|
|
73
|
-
##結果
|
73
|
+
##結果 form1のコード
|
74
|
+
|
75
|
+
|
74
76
|
|
75
77
|
Form1からForm2に表示されます。
|
76
78
|
|
77
|
-
|
79
|
+
|
78
80
|
|
79
81
|
|
80
82
|
|
@@ -108,7 +110,13 @@
|
|
108
110
|
|
109
111
|
##結果2
|
110
112
|
|
113
|
+
Ifをいれるとform2だと画像は表示されません。
|
114
|
+
|
115
|
+
If入れないでpicturebox.image =my.resource.A00だけを入れるとちゃんと画像
|
116
|
+
|
117
|
+
表示しましたか
|
118
|
+
|
111
|
-
|
119
|
+
If入れるとなぜかできません。
|
112
120
|
|
113
121
|
|
114
122
|
|
1
誤字の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,19 +2,7 @@
|
|
2
2
|
|
3
3
|
以前投稿させていただいた物です。
|
4
4
|
|
5
|
-
##やりたい事、わからない事
|
6
|
-
|
7
|
-
・画像を表示させたいのですか、foam1からfoam2に開きfoam2からfoam1にある
|
8
|
-
|
9
|
-
combobox選択された時、ボタンを押してfoam2からボタンを押すと
|
10
|
-
|
11
|
-
画像表示されません。
|
12
|
-
|
13
|
-
画像が表示させたいです。
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
##ソースコード
|
5
|
+
##ソースコード Form1
|
18
6
|
|
19
7
|
```ここにを入力
|
20
8
|
|
@@ -22,7 +10,7 @@
|
|
22
10
|
|
23
11
|
Imports System.Globalization
|
24
12
|
|
25
|
-
Public Class Fo
|
13
|
+
Public Class Form1
|
26
14
|
|
27
15
|
Private ReadOnly list As New Dictionary(Of String, Integer)
|
28
16
|
|
@@ -74,7 +62,7 @@
|
|
74
62
|
|
75
63
|
If ComboBox1.SelectedIndex = 1 Then
|
76
64
|
|
77
|
-
|
65
|
+
Form2.PictureBox1.Image = My.Resources.A01
|
78
66
|
|
79
67
|
End If
|
80
68
|
|
@@ -84,25 +72,27 @@
|
|
84
72
|
|
85
73
|
##結果
|
86
74
|
|
87
|
-
Fo
|
75
|
+
Form1からForm2に表示されます。
|
88
76
|
|
89
|
-
逆にFo
|
77
|
+
逆にForm2からボタンを押すと画像表示されません。
|
90
78
|
|
79
|
+
|
80
|
+
|
91
|
-
##Fo
|
81
|
+
##Form2のソースコード
|
92
82
|
|
93
83
|
```ここに言語を入力
|
94
84
|
|
95
|
-
'Fo
|
85
|
+
'Form2のコード
|
96
86
|
|
97
87
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
98
88
|
|
99
|
-
If
|
89
|
+
If Form1.ComboBox1.SelectedIndex = 0 Then
|
100
90
|
|
101
91
|
PictureBox1.Image = My.Resources.A00
|
102
92
|
|
103
93
|
End If
|
104
94
|
|
105
|
-
If
|
95
|
+
If Form1.ComboBox1.SelectedIndex = 1 Then
|
106
96
|
|
107
97
|
PictureBox1.Image = My.Resources.A01
|
108
98
|
|
@@ -110,7 +100,7 @@
|
|
110
100
|
|
111
101
|
End Sub
|
112
102
|
|
113
|
-
|
103
|
+
Form2_load
|
114
104
|
|
115
105
|
'なし
|
116
106
|
|
@@ -122,7 +112,7 @@
|
|
122
112
|
|
123
113
|
|
124
114
|
|
125
|
-
##
|
115
|
+
##試したこと
|
126
116
|
|
127
117
|
・foam1でcombobox選択されてfoam2に開き画像が表示されるようにしたい
|
128
118
|
|
@@ -130,13 +120,13 @@
|
|
130
120
|
|
131
121
|
```ここに言語を入力
|
132
122
|
|
133
|
-
If
|
123
|
+
If Form1.ComboBox1.SelectedIndex = 0 Then
|
134
124
|
|
135
125
|
PictureBox1.Image = My.Resources.A00
|
136
126
|
|
137
127
|
End If
|
138
128
|
|
139
|
-
If
|
129
|
+
If Form1.ComboBox1.SelectedIndex = 1 Then
|
140
130
|
|
141
131
|
PictureBox1.Image = My.Resources.A01
|
142
132
|
|
@@ -146,17 +136,27 @@
|
|
146
136
|
|
147
137
|
```
|
148
138
|
|
149
|
-
|
139
|
+
##やりたい事
|
150
140
|
|
151
|
-
|
141
|
+
・Form2からボタンを押した時
|
152
142
|
|
153
|
-
|
143
|
+
```ここに言語を入力
|
154
144
|
|
155
|
-
|
145
|
+
'Form2
|
156
146
|
|
157
|
-
|
147
|
+
'Button1
|
158
148
|
|
149
|
+
Form1.combobox1.selectIndex=0
|
150
|
+
|
151
|
+
PictureBox1.Image = My.Resources.A00
|
152
|
+
|
153
|
+
```
|
154
|
+
|
155
|
+
|
156
|
+
|
159
|
-
|
157
|
+
Foam2からボタンを押して画像が表示されるようにしたい。
|
158
|
+
|
159
|
+
|
160
160
|
|
161
161
|
|
162
162
|
|