|
-
May 12th, 2011, 06:17 PM
#1
Thread Starter
Lively Member
[RESOLVED] Problem with deleted control
In the windows form designer, I added a StatusStrip control, made some changes to adding items and changed the names of the items to names I would recognize, for instance I changed "ToolStripStatusLabel3" to "lblMode".
All was fine until I inadvertenly deleted the StatusStrip. Now when I add it back to the form and try to change the name I get an error saying that the name "lblMode" is already in use. And sure enough it is listed in the items of the properties window, but not dislayed anywhere.
I am not sure how to resolve this. I know there is a window, I think its called "Project Designer" or something similar that is code where controls get added but I CANNOT find this window to view the code.
Any Help would be great!
Thanks,
David
-
May 12th, 2011, 06:44 PM
#2
Re: Problem with deleted control
Something has gone wrong because, when you deleted the parent strip, the children should have been deleted too.
You will need to open the designer code file and edit it by hand. You must be careful because, if you do the wrong thing, you may render your form unusable. For that reason, you should create a backup of your project first.
Open the Solution Explorer, select your project and then click the Show All Files button at the top. Now expand the node for your form and then double-click the designer.vb file under it. You should now be looking at the code generated by the designer in response to your visual design actions. Find where this 'lblMode' variable is declared and delete it. That should then throw up a bunch of errors where 'lblMode' is used. Delete them too. Do the same for any other children of the StatusStrip that should also have been deleted. You should now be good to go.
-
May 12th, 2011, 07:04 PM
#3
Thread Starter
Lively Member
Re: Problem with deleted control
AWESOME! Thank you so much!
Thanks,
David
 How much deeper would the ocean be if sponges didn't grow there? 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|