วันพฤหัสบดีที่ 17 มิถุนายน พ.ศ. 2553

PictureBox : เพิ่มรูป


1. เพิ่ม OpenfileDialog
2. เพิ่ม PictureBox
3. เพิ่ม Button
4. พิมพ์ code ที่ button


With OpenFileDialog1
.CheckFileExists = True
.ShowReadOnly = False
.Filter = "All Files|*.*|Bitmap Files (*)|*.bmp;*.gif;*.jpg"
.FilterIndex = 2
If .ShowDialog = DialogResult.OK Then

PictureBox1.Image = Image.FromFile(.FileName)

End If
End With

ไม่มีความคิดเห็น:

แสดงความคิดเห็น