By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,481 Members | 1,199 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,481 IT Pros & Developers. It's quick & easy.

Visual Studio not recognizing a VB form

P: n/a
I have a VB.NET WinForms project that has about 15 forms in it. When I
opened the project yesterday, one of the form files does not open as a form
(i.e. double-clicking it in Solution Explorer opens up the code file, not
the form designer). Also, it does not appear to recognize the code
file....there are no outlining indicators, typing in the code file there is
no Intellisense stuff, and the code does not compile saying that it doesnt
recognize the form's class. The form was completed in July and hasnt been
edited since. I also tried replacing the form file (.vb and .resx) from a
backup and it still does not recognize the form. Could this be an issue in
the solution file? and is there a way to rebuild that or what?

Thanks for any help
Dave Taylor
PERI
Nov 21 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
"Dave Taylor" <no**********@processeng.com> schrieb:
I have a VB.NET WinForms project that has about 15 forms in it. When I
opened the project yesterday, one of the form files does not open as a form
(i.e. double-clicking it in Solution Explorer opens up the code file, not
the form designer). Also, it does not appear to recognize the code
file....there are no outlining indicators, typing in the code file there is


Right-click the file in solution explorer and choose "Open with...". Is the
Forms editor for Visual Basic available there?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #2

P: n/a
Hi Dave

I've seen this happen when you are browsing a file that hasn't been added to
a project. Have you tried doing an Add | Existing Item in Solution
Explorer...?

Nigel

"Dave Taylor" wrote:
I have a VB.NET WinForms project that has about 15 forms in it. When I
opened the project yesterday, one of the form files does not open as a form
(i.e. double-clicking it in Solution Explorer opens up the code file, not
the form designer). Also, it does not appear to recognize the code
file....there are no outlining indicators, typing in the code file there is
no Intellisense stuff, and the code does not compile saying that it doesnt
recognize the form's class. The form was completed in July and hasnt been
edited since. I also tried replacing the form file (.vb and .resx) from a
backup and it still does not recognize the form. Could this be an issue in
the solution file? and is there a way to rebuild that or what?

Thanks for any help
Dave Taylor
PERI

Nov 21 '05 #3

P: n/a
Thanks for the quick reply

Yes, "Visual Basic Form Editor (Default)" is listed...clicking on it brings
up the code for the form but it does not appear to be the standard code
editor (i.e. still no outline marks and no Intellisense). Also, I notice on
the context menu that the "View Code" option is missing, the only option in
that section of the menu is "View Designer".

I also tried Open With...Visual Basic Editor and gives the same
result....something that looks like a code editor but is not.

And it is only this one form...all the other forms work as expected.

I've also tried to exclude from project and then Add Existing Item...same
result....

Thanks

Dave Taylor
PERI

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ey**************@TK2MSFTNGP15.phx.gbl...
"Dave Taylor" <no**********@processeng.com> schrieb:
I have a VB.NET WinForms project that has about 15 forms in it. When I
opened the project yesterday, one of the form files does not open as a
form (i.e. double-clicking it in Solution Explorer opens up the code file,
not the form designer). Also, it does not appear to recognize the code
file....there are no outlining indicators, typing in the code file there
is


Right-click the file in solution explorer and choose "Open with...". Is
the Forms editor for Visual Basic available there?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #4

P: n/a
Nigel,

Thanks for the reply. Yes, I've tried Exclude from Project and Add Existing
Item to bring it back into the project....it gives the same result. I also
removed it from the project, replaced it with the backup files of the form
(.vb and .resx), then added it back into the project....same result.

-- Dave Taylor
PERI


"Nigel Armstrong" <Ni************@discussions.microsoft.com> wrote in
message news:56**********************************@microsof t.com...
Hi Dave

I've seen this happen when you are browsing a file that hasn't been added
to
a project. Have you tried doing an Add | Existing Item in Solution
Explorer...?

Nigel

"Dave Taylor" wrote:
I have a VB.NET WinForms project that has about 15 forms in it. When I
opened the project yesterday, one of the form files does not open as a
form
(i.e. double-clicking it in Solution Explorer opens up the code file, not
the form designer). Also, it does not appear to recognize the code
file....there are no outlining indicators, typing in the code file there
is
no Intellisense stuff, and the code does not compile saying that it
doesnt
recognize the form's class. The form was completed in July and hasnt
been
edited since. I also tried replacing the form file (.vb and .resx) from
a
backup and it still does not recognize the form. Could this be an issue
in
the solution file? and is there a way to rebuild that or what?

Thanks for any help
Dave Taylor
PERI

Nov 21 '05 #5

P: n/a
OK....dont ask me why, but using "Delete" rather than just "Exclude from
Project" fixed the problem. Deleted the files, and then I restored them
from a backup and voila.

Though for some reason it now shows the resx file for the form as well in
Solution Explorer...but hey, thats an anomly I can still compile with! :

Thanks for the input Nigel & Herfried.

-- Dave Taylor
"Dave Taylor" <no**********@processeng.com> wrote in message
news:u9****************@TK2MSFTNGP12.phx.gbl...
I have a VB.NET WinForms project that has about 15 forms in it. When I
opened the project yesterday, one of the form files does not open as a form
(i.e. double-clicking it in Solution Explorer opens up the code file, not
the form designer). Also, it does not appear to recognize the code
file....there are no outlining indicators, typing in the code file there is
no Intellisense stuff, and the code does not compile saying that it doesnt
recognize the form's class. The form was completed in July and hasnt been
edited since. I also tried replacing the form file (.vb and .resx) from a
backup and it still does not recognize the form. Could this be an issue in
the solution file? and is there a way to rebuild that or what?

Thanks for any help
Dave Taylor
PERI

Nov 21 '05 #6

P: n/a
Dave

A simple solution,

Add a new form to your project
Copy all code from your old project
Paste it in your newform
Exclude (not delete direct) that old form from your project

I hope this helps?

Cor

"Dave Taylor"
..
Thanks for the quick reply

Yes, "Visual Basic Form Editor (Default)" is listed...clicking on it
brings up the code for the form but it does not appear to be the standard
code editor (i.e. still no outline marks and no Intellisense). Also, I
notice on the context menu that the "View Code" option is missing, the
only option in that section of the menu is "View Designer".

I also tried Open With...Visual Basic Editor and gives the same
result....something that looks like a code editor but is not.

And it is only this one form...all the other forms work as expected.

I've also tried to exclude from project and then Add Existing Item...same
result....

Thanks

Dave Taylor
PERI

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ey**************@TK2MSFTNGP15.phx.gbl...
"Dave Taylor" <no**********@processeng.com> schrieb:
I have a VB.NET WinForms project that has about 15 forms in it. When I
opened the project yesterday, one of the form files does not open as a
form (i.e. double-clicking it in Solution Explorer opens up the code
file, not the form designer). Also, it does not appear to recognize the
code file....there are no outlining indicators, typing in the code file
there is


Right-click the file in solution explorer and choose "Open with...". Is
the Forms editor for Visual Basic available there?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>


Nov 21 '05 #7

P: n/a
"Dave Taylor" <no**********@processeng.com> schrieb:
Though for some reason it now shows the resx file for the form as well in
Solution Explorer...but hey, thats an anomly I can still compile with! :


Maybe the "Show all files" button on top of the solution explorer is
pressed.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #8

P: n/a
Cor,

Thanks...that is simple and would've worked (just tried it to be
sure)...Delete and restoring it from backup also seemed to work for some
reason.

-- Dave Taylor
"Cor Ligthert" <no************@planet.nl> wrote in message
news:O$**************@TK2MSFTNGP12.phx.gbl...
Dave

A simple solution,

Add a new form to your project
Copy all code from your old project
Paste it in your newform
Exclude (not delete direct) that old form from your project

I hope this helps?

Cor

"Dave Taylor"
.
Thanks for the quick reply

Yes, "Visual Basic Form Editor (Default)" is listed...clicking on it
brings up the code for the form but it does not appear to be the standard
code editor (i.e. still no outline marks and no Intellisense). Also, I
notice on the context menu that the "View Code" option is missing, the
only option in that section of the menu is "View Designer".

I also tried Open With...Visual Basic Editor and gives the same
result....something that looks like a code editor but is not.

And it is only this one form...all the other forms work as expected.

I've also tried to exclude from project and then Add Existing Item...same
result....

Thanks

Dave Taylor
PERI

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ey**************@TK2MSFTNGP15.phx.gbl...
"Dave Taylor" <no**********@processeng.com> schrieb:
I have a VB.NET WinForms project that has about 15 forms in it. When I
opened the project yesterday, one of the form files does not open as a
form (i.e. double-clicking it in Solution Explorer opens up the code
file, not the form designer). Also, it does not appear to recognize the
code file....there are no outlining indicators, typing in the code file
there is

Right-click the file in solution explorer and choose "Open with...". Is
the Forms editor for Visual Basic available there?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>



Nov 21 '05 #9

P: n/a
Nope....show all files isnt pressed. It shows the .resx file as a child
node of the form file. Its strange, but no big deal.

Thx
-- Dave Taylor
PERI

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
"Dave Taylor" <no**********@processeng.com> schrieb:
Though for some reason it now shows the resx file for the form as well in
Solution Explorer...but hey, thats an anomly I can still compile with! :


Maybe the "Show all files" button on top of the solution explorer is
pressed.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #10

P: n/a
"Dave Taylor" <no**********@processeng.com> schrieb:
Thanks...that is simple and would've worked (just tried it to be
sure)...Delete and restoring it from backup also seemed to work for some
reason.


.... and preserves resources too...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.