i cannot view my forms in vb.net 2008

when i run the program i see the forms

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 18894 Views - Last Post: 05 November 2011 - 03:07 PM Rate Topic: -----

#1 wartech  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 203
  • Joined: 16-October 06

i cannot view my forms in vb.net 2008

Posted 15 September 2008 - 08:26 AM

I am having a strange issue with vb.net 2008. I have two forms that I designed, but I cannot bring them up to edit them. I can only view them when I run the program. I have attached a screen shot of my form showing while my program runs. To the left you can see my files.

Any help is appreciated. Thanks!

Attached Image

This post has been edited by wartech: 15 September 2008 - 10:08 AM


Is This A Good Question/Topic? 0
  • +

Replies To: i cannot view my forms in vb.net 2008

#2 magicmonkey  Icon User is offline

  • D.I.C Regular

Reputation: 106
  • View blog
  • Posts: 484
  • Joined: 12-September 08

Re: i cannot view my forms in vb.net 2008

Posted 15 September 2008 - 10:14 AM

View Postwartech, on 15 Sep, 2008 - 08:26 AM, said:

I am having a strange issue with vb.net 2008. I have two forms that I designed, but I cannot bring them up to edit them. I can only view them when I run the program. I have attached a screen shot of my form showing while my program runs. To the left you can see my files.

Any help is appreciated. Thanks!


Can your share the error message you receive when you attempt to open the form up in the designer? This happens all the time in .NET (well at least to me and my crazy forms i seem to make), sometimes you have to comment out one line at a time in the Designer.vb file to find out what is causing it. Most of the time the error message leads you to the problem.

I had outsourced a project once and I kept asking for some changes to this one form, the changes would never seem to make it in. After sitting down with one of the programmers I discovered he had this exact problem. Its funny how often this happens.
Was This Post Helpful? 0
  • +
  • -

#3 wartech  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 203
  • Joined: 16-October 06

Re: i cannot view my forms in vb.net 2008

Posted 15 September 2008 - 10:28 AM

Actually I don't get any error messages. The form comes up only when I run. But I cannot pull it up anywhere to make changes to it in Solution Explorer.
Was This Post Helpful? 0
  • +
  • -

#4 magicmonkey  Icon User is offline

  • D.I.C Regular

Reputation: 106
  • View blog
  • Posts: 484
  • Joined: 12-September 08

Re: i cannot view my forms in vb.net 2008

Posted 15 September 2008 - 10:37 AM

View Postwartech, on 15 Sep, 2008 - 10:28 AM, said:

Actually I don't get any error messages. The form comes up only when I run. But I cannot pull it up anywhere to make changes to it in Solution Explorer.


I got you, looking closer at your picture you can see that the icons are that of a class and not of a form. VS doesn't think they are forms. This can happen when you rename your forms or copy and paste between projects sometimes.

Check to ensure that in both the card1.vb and card1.designer.vb that both the class names match. Also let us know what class it is inheriting in the card1.designer.vb. It should be 'Inherits Windows.Forms.Form'.

If this does not solve it create a new form and select all the controls in the bad form and try to copy and paste them in the new form. Then copy paste the code over. I have done this in the past when nothing else seemed to work.
Was This Post Helpful? 0
  • +
  • -

#5 wartech  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 203
  • Joined: 16-October 06

Re: i cannot view my forms in vb.net 2008

Posted 15 September 2008 - 11:05 AM

card1.Designer.vb
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class card1
	Inherits System.Windows.Forms.Form



When i click on card1.vb I get an empty window, no code and no form.
I tried copying and pasting the code from card.Designer.vb to another project but no luck recreating the interface. I will redo if I have to, which certainly looks like my only option now. Any suggestions?
Was This Post Helpful? 0
  • +
  • -

#6 dineeshd  Icon User is offline

  • member icon

Reputation: 38
  • View blog
  • Posts: 619
  • Joined: 30-June 08

Re: i cannot view my forms in vb.net 2008

Posted 16 September 2008 - 02:56 AM

If you are using any customized (inherited) base form and you don't have proper reference to it, then you may face such problem. Check in the reference section that you have all the references intact.

If you select “.vb” file from solution explorer and click on “View Designer”, you may get some error if such reference issues there.
Was This Post Helpful? 1

#7 magicmonkey  Icon User is offline

  • D.I.C Regular

Reputation: 106
  • View blog
  • Posts: 484
  • Joined: 12-September 08

Re: i cannot view my forms in vb.net 2008

Posted 16 September 2008 - 05:53 AM

View Postwartech, on 15 Sep, 2008 - 11:05 AM, said:

card1.Designer.vb
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class card1
	Inherits System.Windows.Forms.Form



When i click on card1.vb I get an empty window, no code and no form.
I tried copying and pasting the code from card.Designer.vb to another project but no luck recreating the interface. I will redo if I have to, which certainly looks like my only option now. Any suggestions?


Try opening card1.vb in notepad and see if it is truely empty.
Was This Post Helpful? 0
  • +
  • -

#8 wartech  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 203
  • Joined: 16-October 06

Re: i cannot view my forms in vb.net 2008

Posted 16 September 2008 - 03:11 PM

Quote

If you select “.vb” file from solution explorer and click on “View Designer”, you may get some error if such reference issues there.


I did try this but did not get any error message just an empty page.

Quote

Try opening card1.vb in notepad and see if it is truely empty.


I did open up in notepad but again it was empty.

Thanks for the help guys , but I remade the form.
I am not sure exactly why it happended. I just want to prevent it from happening again. Any advice to prevent this from happening again would be appreciated.

This post has been edited by wartech: 16 September 2008 - 03:12 PM

Was This Post Helpful? 0
  • +
  • -

#9 magicmonkey  Icon User is offline

  • D.I.C Regular

Reputation: 106
  • View blog
  • Posts: 484
  • Joined: 12-September 08

Re: i cannot view my forms in vb.net 2008

Posted 16 September 2008 - 08:02 PM

View Postwartech, on 16 Sep, 2008 - 03:11 PM, said:

Quote

If you select “.vb” file from solution explorer and click on “View Designer”, you may get some error if such reference issues there.


I did try this but did not get any error message just an empty page.

Quote

Try opening card1.vb in notepad and see if it is truely empty.


I did open up in notepad but again it was empty.

Thanks for the help guys , but I remade the form.
I am not sure exactly why it happended. I just want to prevent it from happening again. Any advice to prevent this from happening again would be appreciated.


Backups! Schedule a task to ZIP up your project folder each night or use some form of source control software.
Was This Post Helpful? 0
  • +
  • -

#10 BBC  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 30-January 09

Re: i cannot view my forms in vb.net 2008

Posted 30 January 2009 - 12:25 PM

Were you trying to inherit forms? If so, thats why the issue happened. I have had that problem in 2008 before.
Was This Post Helpful? 0
  • +
  • -

#11 VBTeacher  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 15-September 09

Re: i cannot view my forms in vb.net 2008

Posted 15 September 2009 - 09:11 AM

View PostBBC, on 30 Jan, 2009 - 11:25 AM, said:

Were you trying to inherit forms? If so, thats why the issue happened. I have had that problem in 2008 before.

Hello,

I discovered these posts while looking for a solution to a similar problem. I have the same issue with Visual Basic.Net 2008 and have yet to find a solution.

A student created a project with
- form 1 has 4 labels and a timer that goes to the second form after 4 seconds
- form 2 has checkboxes and textboxes
The student saved the file. The next day when he loaded the sln file, the form image and form code are not visible at design time. If you run the program, it works fine.

I have courses where students create many VB.Net projects throughout the term. This problem recurs about 6 times a year. It happened in version 2005. This week, we moved to 2008 and it happened again. The projects are not inheriting forms.

Any ideas are greatly appreciated. It is hard on students when they have to recreate their assignment from scratch.

Thanks
Was This Post Helpful? 0
  • +
  • -

#12 drinky  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 05-November 09

Re: i cannot view my forms in vb.net 2008

Posted 05 November 2009 - 10:13 AM

View PostVBTeacher, on 15 Sep, 2009 - 08:11 AM, said:

View PostBBC, on 30 Jan, 2009 - 11:25 AM, said:

Were you trying to inherit forms? If so, thats why the issue happened. I have had that problem in 2008 before.

Hello,

I discovered these posts while looking for a solution to a similar problem. I have the same issue with Visual Basic.Net 2008 and have yet to find a solution.

A student created a project with
- form 1 has 4 labels and a timer that goes to the second form after 4 seconds
- form 2 has checkboxes and textboxes
The student saved the file. The next day when he loaded the sln file, the form image and form code are not visible at design time. If you run the program, it works fine.

I have courses where students create many VB.Net projects throughout the term. This problem recurs about 6 times a year. It happened in version 2005. This week, we moved to 2008 and it happened again. The projects are not inheriting forms.

Any ideas are greatly appreciated. It is hard on students when they have to recreate their assignment from scratch.

Thanks


I had the same issue. What I noticed when comparing to another form what that the class definition for the form as well as all the coordinates for the components on the form were all in the frmXYZ.Designer.vb and not in the frmXYZ.vb. I cut/pasted all that from designer to the form code and bam, everything seems to be fine! IDK how it happened in the first place but I'm not necessarily concerned since its Microsoft :D
Was This Post Helpful? 0
  • +
  • -

#13 VBTeacher  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 15-September 09

Re: i cannot view my forms in vb.net 2008

Posted 09 November 2009 - 10:16 AM

View Postdrinky, on 5 Nov, 2009 - 09:13 AM, said:

View PostVBTeacher, on 15 Sep, 2009 - 08:11 AM, said:

View PostBBC, on 30 Jan, 2009 - 11:25 AM, said:

Were you trying to inherit forms? If so, thats why the issue happened. I have had that problem in 2008 before.

Hello,

I discovered these posts while looking for a solution to a similar problem. I have the same issue with Visual Basic.Net 2008 and have yet to find a solution.

A student created a project with
- form 1 has 4 labels and a timer that goes to the second form after 4 seconds
- form 2 has checkboxes and textboxes
The student saved the file. The next day when he loaded the sln file, the form image and form code are not visible at design time. If you run the program, it works fine.

I have courses where students create many VB.Net projects throughout the term. This problem recurs about 6 times a year. It happened in version 2005. This week, we moved to 2008 and it happened again. The projects are not inheriting forms.

Any ideas are greatly appreciated. It is hard on students when they have to recreate their assignment from scratch.

Thanks


I had the same issue. What I noticed when comparing to another form what that the class definition for the form as well as all the coordinates for the components on the form were all in the frmXYZ.Designer.vb and not in the frmXYZ.vb. I cut/pasted all that from designer to the form code and bam, everything seems to be fine! IDK how it happened in the first place but I'm not necessarily concerned since its Microsoft :D

Was This Post Helpful? 0
  • +
  • -

#14 VBTeacher  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 15-September 09

Re: i cannot view my forms in vb.net 2008

Posted 09 November 2009 - 10:24 AM

Hi,

Thanks for your reply. I am hoping you can clarify a bit.

I added the class header and that brought my form controls back, which was great.

The code window itself is still blank, except for my newly typed class header. When I run it, it works beautifully so the code is there just not visible.

I'm not sure exactly what to copy from the designer file. I tried copying the initializecomponent procedure but it yields a multiple definitions with identical signatures error. If I try to copy any routines from the designer, I get the same multiple definitions error.

Thanks.
Was This Post Helpful? 0
  • +
  • -

#15 Guest_kenmelagi*


Reputation:

Re: i cannot view my forms in vb.net 2008

Posted 05 January 2011 - 09:38 PM

View PostVBTeacher, on 09 November 2009 - 09:24 AM, said:

Hi,

Thanks for your reply. I am hoping you can clarify a bit.

I added the class header and that brought my form controls back, which was great.

The code window itself is still blank, except for my newly typed class header. When I run it, it works beautifully so the code is there just not visible.

I'm not sure exactly what to copy from the designer file. I tried copying the initializecomponent procedure but it yields a multiple definitions with identical signatures error. If I try to copy any routines from the designer, I get the same multiple definitions error.

Thanks.


I have the same problem and have found the solution. Edit your form1.vb file, that should be empty, and put this code:


Public Class Form1

End Class


Then Replace form1 with the class name of the form you have. this must match the one declared in the Form1.Designer.vb file.

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
Inherits System.Windows.Forms.Form
......
End Class


Sorry for my english though. :whistling:
Was This Post Helpful? 0

  • (2 Pages)
  • +
  • 1
  • 2