16,717
社区成员
发帖
与我相关
我的任务
分享
‘vs2005
Private WithEvents TestPic As New PictureBox
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TestPic.BorderStyle = BorderStyle.FixedSingle
TestPic.Dock = DockStyle.Fill
Me.Controls.Add(TestPic)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ofd As New OpenFileDialog
ofd.Filter = "Jpg|*.jpg"
If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim img As Image = Image.FromFile(ofd.FileName)
img.RotateFlip(RotateFlipType.Rotate90FlipNone)
TestPic.Image = img
img.Save(ofd.FileName)
End If
End Sub