01-12-18, 04:51 PM
كود :
Dim strBasePath As String = Application.StartupPath & "\Photos"
If Not Directory.Exists(strBasePath) Then Directory.CreateDirectory(strBasePath)
Dim strFileName As String = strBasePath & "\" & Me.TextBox1.Text.Trim & ".jpg"
If File.Exists(strFileName) Then
If MsgBox("الصورة موجودة، هل تريد الحفظ فو", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
PictureBox1.Image.Save(strFileName, System.Drawing.Imaging.ImageFormat.Jpeg)
End If
Else
PictureBox1.Image.Save(strFileName, System.Drawing.Imaging.ImageFormat.Jpeg)
End If
