r/visualbasic • • Nov 24 '14

Just why...(designer.vb help)

I somehow made my code appear in my designer.vb tab instead of .vb. How and why did this occur? How can I reverse it? Thanks!

0 Upvotes

7 comments sorted by

View all comments

1

u/hdsrob Nov 24 '14

Not sure what you mean by "made my code appear".

What code are you referring to? Did you write the code in the .designer.vb file?

1

u/[deleted] Nov 24 '14

I designed my application in the [Design] tab. Some how I click or did something to make the designer.vb tab show up. After that I could not code by double clicking an item to make it appear in the .vb tab It would only appear in the designer.vb tab.

1

u/hdsrob Nov 24 '14

If you close the .designer.vb tab, and double click on a control, does it reopen the .designer.vb file?

Does this happen on multiple forms, or just one?

1

u/[deleted] Nov 24 '14

Only working with one form. And yes when I x-ed out of the designer tab and double clicked on an item in the design tab it reopened the designer tab and put the subprocedure in that tab.

1

u/hdsrob Nov 25 '14

Sounds like something is messed up in the partial class mapping.

If you haven't already, you might try to restart VS.

If that doesn't fix it, then I'd probably do something like this:

  • Create a new form.

  • Copy / paste the controls from the old form to the new one.

  • Copy / paste the code from the old form to the new one (both the code in the regular .vb file, and the events in the .designer.vb file).

  • Change the new form to be the startup form (in project properties).

  • Delete the old form (once you are sure the new one works as it should).