画像ビューア VB.NET入門

      2016/04/24


ボタンを押したらピクチャーボックスに画像が表示されるだけです。

Public Class Form1
Dim path As String
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
OpenFileDialog1.ShowDialog()
End Sub
Private Sub OpenFileDialog1_FileOk(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
path = OpenFileDialog1.FileName
PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
PictureBox1.Image = Image.FromFile(path)
End Sub
End Class

PR



 - 実践作成編

Translate »