質問編集履歴

2

14:48 ソースコード間違っていたので修正しました。

2020/04/12 05:48

投稿

osarusan
osarusan

スコア5

test CHANGED
File without changes
test CHANGED
@@ -54,7 +54,7 @@
54
54
 
55
55
  pictureBox.Image = resizeimg;
56
56
 
57
- pictureBox.Location = new Point(0 + (43 * i),0);
57
+ //pictureBox.Location = new Point(0 + (43 * i),0);
58
58
 
59
59
  this.panel1.Controls.Add(pictureBox);
60
60
 
@@ -74,6 +74,4 @@
74
74
 
75
75
  ### 補足情報(FW/ツールのバージョンなど)
76
76
 
77
- 14:46 ソースコード間違っていたので修正しました。
78
-
79
77
  ここにより詳細な情報を記載してください。

1

ソースコードが一部間違っていた

2020/04/12 05:48

投稿

osarusan
osarusan

スコア5

test CHANGED
File without changes
test CHANGED
@@ -34,19 +34,19 @@
34
34
 
35
35
  ```C#
36
36
 
37
- PictureBox pictureBox = new PictureBox();
37
+ for (int i = 0; i < 2; i++) {
38
38
 
39
- for (int i = 0; i < 2; i++) {
39
+ PictureBox pictureBox = new PictureBox();
40
40
 
41
41
 
42
42
 
43
- Bitmap img = new Bitmap(imagefilepath[i]); //String型の配列で画像ファイルパスが入れてある
43
+ Bitmap img = new Bitmap(userCDList[0]);
44
44
 
45
45
  Bitmap resizeimg = new Bitmap(this.Width, this.Height);
46
46
 
47
47
  Graphics g = Graphics.FromImage(resizeimg);
48
48
 
49
- g.DrawImage(img, 10 * i, 0, 40, 40);
49
+ g.DrawImage(img, 0, 0, 40, 40);
50
50
 
51
51
  g.Dispose();
52
52
 
@@ -54,7 +54,7 @@
54
54
 
55
55
  pictureBox.Image = resizeimg;
56
56
 
57
- //pictureBox.Location = new Point(0 + (40 * i),0); ←?
57
+ pictureBox.Location = new Point(0 + (43 * i),0);
58
58
 
59
59
  this.panel1.Controls.Add(pictureBox);
60
60
 
@@ -74,6 +74,6 @@
74
74
 
75
75
  ### 補足情報(FW/ツールのバージョンなど)
76
76
 
77
-
77
+ 14:46 ソースコード間違っていたので修正しました。
78
78
 
79
79
  ここにより詳細な情報を記載してください。