بسم الله الرحمن الرحيم
الاخوة الافاضل ظهرت لي الرسالة التالية
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
بعد تنفيذ الكود التالي بعد المرة الثانية
Try
My.Application.DoEvents()
Me.PictureBox4.Image = Nothing
Me.PictureBox4.ImageLocation = ""
filename1 = Nothing
OpenFileDialog1.RestoreDirectory = True
OpenFileDialog1.InitialDirectory = (Application.StartupPath & "\DOCUMENTS")
OpenFileDialog1.Filter = "Photo Files (*.jpg)|*.jpg|AllFiles (*.*)|*.*" '
OpenFileDialog1.Title = "حدد مسار الصورة"
OpenFileDialog1.FileName = ""
OpenFileDialog1.ShowDialog()
filename1 = OpenFileDialog1.FileName
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Tryوخاصة تظهر رسالة الخطأ في السطر التالي
OpenFileDialog1.ShowDialog()
مع الرغم بحثت عن حلول ولن نصل الى حل لذا نرجو من الاخوة الافاضل ان لا يبخلوا علينا في حل هذه المشكلة