Load Images via OpenFileDialog :
Dim result As DialogResult = OpenFileDialog1.ShowDialog
If result = Windows.Forms.DialogResult.OK Then
If (OpenFileDialog1.FileName IsNot Nothing) Or (OpenFileDialog1.FileName <> String.Empty) Then
PictureBox1.BackgroundImage = Image.FromFile(OpenFileDialog1.FileName)
PictureBox1.BackgroundImageLayout = ImageLayout.Zoom
End If
End If
O R
Dim ofd As New OpenFileDialog
If ofd.ShowDialog = DialogResult.OK Then
If ofd.FileName <> String.Empty Then
Me.myPictureBox.Image = Bitmap.FromFile(ofd.FileName)
End If
End If
Load Images via Clipboard :
PictureBox1.SizeMode() = PictureBoxSizeMode.Zoom
PictureBox1.Image() = Clipboard.GetImage()
Load Images From Resource :
PictureBox1.Image = My.Resources.<Name_of_res_file>
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! | |||
作者: | 用户:
密码: 注册? 验证: |
||
评论:
禁止表情 禁止UBB 禁止图片 识别链接 识别关键字 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|||