Visual Studio Development Bookmark and Share   
 index > Visual C# Express Edition > Form designes does not work anymore
 

Form designes does not work anymore

Hi guys

I have a strange issue in the form that I cannot change anything with the form editor anymore.
If I add or change anything in form editor, the whole project crashes during the next buit and all changes are lost.
I can add items manually by adding code in the appropriate positions - especially where it says "The following section was created
by the designer and should not be edited.
I have no idea where to start to fix this, is the any compile log where I could see what the built process stops?


Thanks a nlot for any help.

Eric
I0sens  Sunday, October 18, 2009 10:16 PM
Does this occur with all forms or projects? What if you start a new project?

Mark the best replies as answers. "Fooling computers since 1971."
Rudedog2  Monday, October 19, 2009 1:25 PM
Hi Rudedog2

New projects work fine.

It's just this on project that is screwed up somewhere.

Thanks

Eric
I0sens  Monday, October 19, 2009 11:10 PM
Hi Eric,

Thank you for your post.

Frankly speaking, this might be hard to troubleshoot online since there would be many causes for the crash to happen.

However, you can try the following steps to deal with the case:
1. Tryrunning devenv /Safemode to see if you can open it correctly.
2. Reboot the machine into Safe Mode. This can isolate some third party application/driver's interference.
3. Switch to try a new user account. This can rule out the possibility of corrupted user profile.

Please try checking in yourevent log and see if you see any exceptions that are logged around the time that the error occurs.
For more information on how to view event log, please see: http://support.microsoft.com/kb/308427

Usually, we need to look into the memory dump to know what the cause is.
To troubleshooting crash issue, typically we need to analyze the crash memory dumpthat honestly is hard to do online (Here is a blog on How to obtain crash dump in Visual Studio 2005(also apply to VS2008). TheMSDN feedback site refers tohttp://connect.microsoft.com)

Additionally,another useful toolis the Process Monitor tool http://www.microsoft.com/technet/sysinternals/utilities/processmonitor.mspx which can capture the access log.
Filter on the process name devenv.exe in the log so that you see only the related list.
This should give you more info on what are the registry keys/ files being accessed when the crash happens.

Hope this helps. If you have any concern, please feel free to let me know.

Best regards,
Yichun Chen
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
YiChun Chen  14 hours 40 minutes ago
Hi guys

I have a strange issue in the form that I cannot change anything with the form editor anymore.
If I add or change anything in form editor, the whole project crashes during the next buit and all changes are lost.
I can add items manually by adding code in the appropriate positions - especially where it says "The following section was created
by the designer and should not be edited.

I have no idea where to start to fix this, is the any compile log where I could see what the built process stops?


Thanks a nlot for any help.

Eric


Try undoing all of your changes, by copying them from the form.designer.cs file---basicalluy reserved for use by the Designer---to the form.cs file, which was designed to be used by the developer.

I assume that you are making your changes in the InitializeComponent method. That method is called in the Form.cs file, inside of the class constructor. You could add a similar method that executes after InitializeComponent. Copy the changes you made into this method.

public Form1()
{
InitializeComponent();
Initialize_this(); // comment out this line when the form 'breaks'
}

private void Initialize_this()
{
return; // add whatever code you need in this method.
}


The nice part about this approach is that if you 'break' your form, you can always comment out the method call for diagnostic purposes.

Hope this helps.

Rudedog =8^D

Mark the best replies as answers. "Fooling computers since 1971."
Rudedog2  9 hours 49 minutes ago

You can use google to search for other answers

Custom Search

More Threads

• How to make a button private in an WPF xaml defined Window in VC# 2008 express?
• Can't reference Table Adapter!
• Test Questions for visual C# Express
• C# Express 2008 support for SQL Server 2005 (full) hosted DB
• How do I include a folder into the project so it will be copied into bin\Debug folder after I build the project?
• could not open sql connection using C# code
• Copy file
• textbox_keypress does not handle both backspace and write the key event
• Opening another application question?
• Question on VSTO