02-04-20, 11:31 PM
(02-04-20, 11:23 PM)معاند الحظ كتب : والله يا اخي ماني قادر احمل مشروعك رغم الحجم الصغير لانه كل ماقربر يكتمل يرجع يعيد التحميل
أشتغل على نفس المشروع وحظ الكود هذا imgeErorr
كود :
Dim a As New OpenFileDialog
With a
.AddExtension = True
.CheckPathExists = True
.CheckFileExists = True
.Title = "أختر صورة التي تريدها"
.Filter = "Choose Image(*.PNG;*.GIF;*.JPG;*.JPEG)|*.PNG;*.GIF;*.JPG;*.JPEG | All Files(*.*)|*.*"
If .ShowDialog = DialogResult.OK Then
Dim bmp As New Bitmap(Image.FromFile(.FileName & ""), New Size(Convert.ToInt32(110), Convert.ToInt32(70)))
'Application.StartupPath & "\Pices\" & CDec + ".PNG"
If IO.Directory.Exists(Application.StartupPath & "\Pices") = True Then
bmp.Save(Application.StartupPath & "\Pices\" & Code_Prd.Text + ".PNG")
Else
IO.Directory.CreateDirectory(Application.StartupPath & "\Pices")
bmp.Save(Application.StartupPath & "\Pices\" & Code_Prd.Text + ".PNG")
End If
Prd_Photos.Image = Image.FromFile(Application.StartupPath & "\Pices\" & Code_Prd.Text + ".PNG")
bmp.Dispose() : a.Dispose()
End If
End With