Visual Studio - Visual Basic - Protected Memory Error?

299 views Asked by At

Currently I am using Visual Basic 2008 (.NET Framework 2.0) to create a program. However, when I add or select controls such as panels, group boxes, etc. I get error messages. For example, when I try to add a panel control I get the following message,

enter image description here

After clicking OK button, the panel control is added but the following happens to the panel control,

enter image description here

Yet I can still add other controls inside it. When I save and re-open the project, it shows the normal panel control. But when I select the panel control it does as shown in the second image again.

I tried this in Visual Basic 2008, 2010, 2012 and 2013. Same thing. I have full administrator access to the computer.

What is the reason for this and how to fix it?

I re-installed Windows and then Visual Studio 2008. The error did not occur after that. But when I updated the computer via Windows Update, the error came back.

2

There are 2 answers

0
Codename K On BEST ANSWER

The error was due to a Windows Update. Because it does not show any errors on non-updated Windows 7. The error only appears after updating Windows 7

It was difficult to find which update was the reason for the issue. The solution was to install Windows 7 and Visual Studio and never update it. This way, it seems to fix the issue and it does not show the errors anymore.

Reference: https://social.msdn.microsoft.com/Forums/vstudio/en-US/76790023-4d01-43a5-b901-65ad93a5183d/visual-studio-visual-basic-protected-memory-error?forum=visualstudiogeneral&prof=required

4
xpda On

Try creating a new project, then copy and paste code from the old project. You may or may not have to recreate the forms in the designer. Also, make sure you have System, System.Core, System.Drawing, and System.Windows.Forms included as references for the project.