none
Recovering Form Designer

    Question

  • I've (more than once) been faced with he unfortunate error of "Code Generator failure" or some such catastrophic like that. when debugging a form  When this happens, I usually end up with a blank non-functioning form.  All of it's objects and properties are still there in the background in the form's Solution Explorer and Properties window, but nothing is drawn on the form.  My only recourse so far has been to redefine the form - starting over from scratch.

    Question is there a way to "rejuvenate" the failed form without renaming it, creating a new form (hopefully retrieving and salvageable some properties from the failed form,),then deleting the failed form?

    I think the Form's Designer simply gives up in whole or in part  and is not (fully) developed.

    I'm using Visual Basic Express 2010, Wndows 10 Home, 8GB RAM,  25 years experience with MS Basic (all versions all the way from MS BASIC) but I've never encountered this problem in other versions..

    Any ideas or suggestions would be appreciated!

    Thanks,

    Eddie-San


    ejl

    Tuesday, April 18, 2017 11:53 PM

All replies

  • Question is there a way to "rejuvenate" the failed form without renaming it, creating a new form (hopefully retrieving and salvageable some properties from the failed form,),then deleting the failed form?

    This is not a problem that is mentioned often.  The best solution might be to upgrade to a newer version.

    https://www.visualstudio.com/vs/community/

    Wednesday, April 19, 2017 12:14 AM
  • Hello,

    This is a good reason to use some form of version control and also (don't know if you do this or not) place any non-form code in classes or code modules so if by chance the version software does not help at least you don't have to copy and paste code from the bad form to a new form.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Wednesday, April 19, 2017 12:29 AM
    Moderator
  • Eddie,

    The form is just code, you can see it if you set in top of Solutions "Show all Files" to true, since version 2002 this is standard in C# but despite all begging of MVP's it never got parity in VB.

    Yourprogram.designer.vb is the name of the file. 


    Success
    Cor

    Wednesday, April 19, 2017 11:25 AM