Error message "Attempted to read or write protected memory. This is often an indication that other m

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello
I haveanerrormessageappearsas follows
"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.FileName = ""
OpenFileDialog1.ShowDialog()
filename1 = OpenFileDialog1.FileName
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Especiallyerror message appearson the next line

OpenFileDialog1.ShowDialog()
Although searched for solutions, we will not reacha solution, sowe hope you help please

View the full article
 
Back
Top