Results 1 to 4 of 4

Thread: [RESOLVED] Form Objects removed?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2010
    Posts
    131

    Resolved [RESOLVED] Form Objects removed?

    OK, I got a huge problem. I was adding some controls to a project of mine and I think I accidentally clicked 'Exclude from Project' on the folder that contained those custom user controls.
    From there, clicking on my form's design view threw an error about my missing custom controls, I clicked Debug and Voila, my form became empty (went to the default form state) all the controls gone, which ruined my 3 month project.
    Is there any way to set the form to how it was, or is the damage done, and it can't be recovered?
    The controls still exist in the solution explorer when I click on my form, so I guess they are not totally deleted.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,989

    Re: Form Objects removed?

    The first thing to do is to include them back into the project with Include Existing (through Solution Explorer or the Project menu). However, that may not solve the problem, as it kind of sounds like the designer got rid of the errant stuff out of the form.designer.vb file, in which case you better have a backup. Still, the stuff may still be in the .designer.vb file, in which case re-including the objects may be all you need to do.
    My usual boring signature: Nothing

  3. #3
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: Form Objects removed?

    if you turn on the Show All Files option on the project in the Solution Explorer... you'll find your items, but they will be greyed out... right click them and select "Include in project" ... the controls may or may not be done completely from you form.,... look at the form's .designer.vb file ... see if the code tocreate and add the controls is still there... if so, you may still be OK.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Apr 2010
    Posts
    131

    Re: Form Objects removed?

    Yeah, the code was still there in the designer file as well. I got it fixed now, thanks both of you. Phew

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width