gouber
asked on
Visual Studio 2005 Form Objects Disappeared
I have a program that I coded in Visual Studio 2005 and it has worked fine for a while. The other day I made a minor change and added a title for the main form. About that time I noticed that all the form objects have disappeared. I can still see the items in the drop down for properties, but I cannot select any of the items in the form. When I run the application the form items do not display either.
I have seen a few forums about this and they all say upgrade to SP1, I already had that before this problem showed up. Please let me know if anyone has any ideas.
Thanks,
TJ
I have seen a few forums about this and they all say upgrade to SP1, I already had that before this problem showed up. Please let me know if anyone has any ideas.
Thanks,
TJ
look in the initialize components function to see if they are still being added.-- one time i made a change to add a on click event. ctrl-z'd to get rid of it and it trashed all of my controls.
ASKER
Thanks for the comment. I had forgot to mention that I looked there as well. As far as I can tell the items are added. For example, I have a panel as one of the objects. Below is the code that is in the initialize function. Please let me know if that does not seem like everything.
Thanks,
TJ
this.pnlMain = new System.Windows.Forms.Panel ();
this.pnlMain.Location = new System.Drawing.Point(0, 0);
this.pnlMain.Name = "pnlMain";
this.pnlMain.Size = new System.Drawing.Size(10, 10);
this.pnlMain.TabIndex = 0;
Thanks,
TJ
this.pnlMain = new System.Windows.Forms.Panel
this.pnlMain.Location = new System.Drawing.Point(0, 0);
this.pnlMain.Name = "pnlMain";
this.pnlMain.Size = new System.Drawing.Size(10, 10);
this.pnlMain.TabIndex = 0;
there should be a controls.add(your control name);
somewhere
somewhere
ASKER
Yes, there is a line that has this.toolStripContainer1.C ontentPane l.Controls .Add(this. pnlMain). Sorry, I missed that before. Currently I am comparing this to a similar form line by line. Please let me know if you have any other ideas. Thanks for your help so far.
Thanks,
TJ
Thanks,
TJ
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It is a default form that I added controls to.
-TJ
-TJ
ASKER
p_davis,
Thanks for all your help, I am just going to give up and redo the form. When I compared the items line by line they looked the same. I will still award you the points for your help, I am giving you a B because the answer did not come directly from you, but you still put lots of thought into this.
Thanks,
TJ
Thanks for all your help, I am just going to give up and redo the form. When I compared the items line by line they looked the same. I will still award you the points for your help, I am giving you a B because the answer did not come directly from you, but you still put lots of thought into this.
Thanks,
TJ
thanks and good luck