Resimlerinizi görüntüleyin va boyutlandırın.
Kodlar ;
Public Class ResimReSizer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim OpenFileDialog1 As New OpenFileDialog
RadioButton1.Checked = True
PictureBox1.SizeMode = PictureBoxSizeMode.Normal
With OpenFileDialog1
.CheckFileExists = True
.ShowReadOnly = False
.Filter = "All Files|*.*|Bitmap Files (*)|*;*.gif;*.jpg"
.FilterIndex = 2
If .ShowDialog = DialogResult.OK Then
'berlilene dosyayı bicturebox un içine ekliyoruz
PictureBox1.Image = Image.FromFile(.FileName)
End If
End With
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
PictureBox1.SizeMode = PictureBoxSizeMode.Normal
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
PictureBox1.SizeMode =
PictureBoxSizeMode.StretchImage
End Sub
Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
PictureBox1.SizeMode = PictureBoxSizeMode.CenterImage
End Sub
Private Sub ResimReSizer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
RadioButton1.Checked = True
PictureBox1.SizeMode = PictureBoxSizeMode.Normal
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
End
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form2.Show()
End Sub
End Class