PictureBox

PictureBoxは、画像を表示するために使うピクチャーボックスコントロールを扱うクラス・・・。

PictureBox クラス (System.Windows.Forms)

このピクチャーボックスに画像を表示する・・・。

f:id:BG1:20160419130707p:plain

を選択し、

f:id:BG1:20160419130903p:plain

これぐらい大きく配置・・・。

f:id:BG1:20160419131000p:plain

その下にbutton1を配置・・・。

button1が押された時、

Image.FromFileで"bitmap1.bmp"をロードして、pictureBox1.Imageに格納・・・。

Form1が閉じられる時、

pictureBox1.Imageを解放する・・・。

実行すると、

f:id:BG1:20160419131412p:plain

ピクチャーボックスごと表示されていないように見えるが、button1をクリックすると、

f:id:BG1:20160419131447p:plain

画像が表示される・・・。

Sample/Program.cs at master · bg1bgst333/Sample · GitHub
Sample/Form1.cs at master · bg1bgst333/Sample · GitHub
Sample/Form1.Designer.cs at master · bg1bgst333/Sample · GitHub