Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Renamed form in solution explorer and now designer won't load
 

Renamed form in solution explorer and now designer won't load

This is such an ungodly error. I renamed the form in my solution explorer by right-clicking and clicking rename. I goto load the form in designer and I get the typical error that all my controls of my form are no longer a member of the now renamed form. I remembered having this problem before so I viewed the code in my "form.vb" file and tried to rename the class to reflect the changes but it still did not work. How can this possibly happen. All the proper names match eachother yet it refuses to add the controls back to my form? How absurd is this behavior? This form was very painstakingly designed in the designer and i would hate to have to go through and redesign the etnire form again just because I wanted to rename the file.
jadacyrus  Wednesday, September 02, 2009 8:58 PM
Just figured out the problem myself. In case anyone is interested in the future I will post the answer. At the end of the Designer.vb file for the form there are always the declrations of your controls that go like "Friend WithEvents <ControlName> as <Control>" I'm having to manualyl add them in and match them with the names of the controls i gave them. You can use your other forms designer.vb file for reference on the syntax and just look at the designer.vb file for the erroneous form for reference on what your controls name's were. This seems to be fixing the errors so far.
jadacyrus  Wednesday, September 02, 2009 9:05 PM
Just figured out the problem myself. In case anyone is interested in the future I will post the answer. At the end of the Designer.vb file for the form there are always the declrations of your controls that go like "Friend WithEvents <ControlName> as <Control>" I'm having to manualyl add them in and match them with the names of the controls i gave them. You can use your other forms designer.vb file for reference on the syntax and just look at the designer.vb file for the erroneous form for reference on what your controls name's were. This seems to be fixing the errors so far.
jadacyrus  Wednesday, September 02, 2009 9:05 PM

You can use google to search for other answers

Custom Search

More Threads

• creating 3d disabled toolbar button like IE has
• IResourceService
• Visual studio resizes forms
• Collection Class not inheriting CollectionBase properly
• ImageIndex
• Getting user inputs
• Wanted: Collapsable TreeView/ListView control
• how to add context menu in test results window through visual studio integration package sdk
• Longhorn style Breadcrumb Bar
• Making user-control's child control clickable from VS 2005