VB Forms issue- Visual Studio Community Edition, 2019
I had a recent issue with my VB forms app- I've lost the Form Designer, and can't pull it up in the editor. The GUI I made for the project still pops up when I hit start though, so I know it's saved in there somewhere- any idea what could be wrong? File attached in zip.
Re: VB Forms issue- Visual Studio Community Edition, 2019
It's there. It's the Form1.designer.vb file.
All the form designer does is provides you a GUI for manipulating that file. All the code that is in that file is what is used to show your GUI, so as long as you have the designer.vb file, then you have your form.
Normally, if something gets corrupted in that file, when you try to show the form in the designer, you get a messy window saying that there are errors. From your description, it sounds like you are getting nothing, though. Is that right?
Re: VB Forms issue- Visual Studio Community Edition, 2019
Based on the size of your attachment, unless you have included some images, you have included the compiled binaries. That is not allowed. Make sure that you delete the obj and bin folders from your project folder before zipping a solution or project.
Re: VB Forms issue- Visual Studio Community Edition, 2019
When I've had issues like this in the past, here is something that has worked for me:
1. Add a new project to the solution.
2. In the Solution Explorer, drag the form to the new project to copy it.
3. Check that the form opens as expected in the new project.
4. Delete the original form from the original project.
5. Drag the form from the new project back to the original.
6. Check that the form opens as expected in the original project.
7. Delete the new project.
I can't guarantee that this will work but it has done for me and others on a number of occasions. If you're not using source control, which you should be, then make sure that you backup your solution first. Of course, if you were using source control then you probably wouldn't be asking about this in the first place, because you could simply revert to the last committed state that was showing this behaviour. This is an example of why even hobbyists should be using source control. Support for Azure DevOps accounts, which you can get free, are built into VS, but you can also use GitHub or various other options too.
Re: VB Forms issue- Visual Studio Community Edition, 2019
Sorry- I have no clue what Source Control is. And I'm not a hobbyist- I'm in a class for Visual Basic Programming, and we haven't covered that in class yet.
Re: VB Forms issue- Visual Studio Community Edition, 2019
Originally Posted by Shaggy Hiker
It's there. It's the Form1.designer.vb file.
All the form designer does is provides you a GUI for manipulating that file. All the code that is in that file is what is used to show your GUI, so as long as you have the designer.vb file, then you have your form.
Normally, if something gets corrupted in that file, when you try to show the form in the designer, you get a messy window saying that there are errors. From your description, it sounds like you are getting nothing, though. Is that right?
Another issue I'm having- is that when I DID still have access to the GUI, the Event Handlers were being created in the design file instead of the form1.vb
Re: VB Forms issue- Visual Studio Community Edition, 2019
I've never seen that.
Technically, it shouldn't matter where they are being created. They're just text files, but the designer file isn't visible by default, and can be re-written at any time by the designer...though it sounds like you won't be having THAT problem until you can get the designer back.
Re: VB Forms issue- Visual Studio Community Edition, 2019
Originally Posted by Shaggy Hiker
I've never seen that.
Technically, it shouldn't matter where they are being created. They're just text files, but the designer file isn't visible by default, and can be re-written at any time by the designer...though it sounds like you won't be having THAT problem until you can get the designer back.
Very true. It sucks because the project was due today and I still haven't figured it out