Windows Develop Bookmark and Share   
 index > Windows Forms General > Windows form keeps dissappearing
 

Windows form keeps dissappearing

Hi,

Ive got a rather silly question...hope someone can help. I have created a project with several forms. One form in particular is causing me problems. I cant seem to find my main form (form 1). This is the second project this has happened in.The solution explorer lists all my forms except form 1 which is my main form. When i debug/run the code, my form comes up as per normal. Whats going on? Why cant i find my form in solution explorer or anywhere for that matter? I think i may have overlooked a simple concept here but novice coders tend to do that!

I would be really grateful forany help.

Cheers

Aaron

AaRoN_P  Monday, February 13, 2006 11:07 AM
Search your solution (ctrl+shift+f) for "class form1", not case-sensitive. The results will show up in the "Find Results" window at the bottom of the screen; there will probably only be one line. Double click that line and that file will open in the code window. Now look at your solution explorer; the open file will be selected, and that's your main form.
CommonGenius  Monday, February 13, 2006 3:08 PM

Hey,

I think there is a show all files option, Or try to refresh the project. Showing all files may have it there, which right-click > include in project.

Brian

Brian Mains  Monday, February 13, 2006 4:24 PM

Ok i tried the search and still nothing. I actually searched for forms i knew were there and they still didnt come up in the search results. I just searched for "class" in the end and it came upwith a list of results. I double clicked Form1 and its just the code. I thinkI explained my problem poorly earlier.. sorry my bad.

My code for Form1 is there and can be found in the solution explorer, i have no problem there. My problem is that i cant bring up my actual form i.e. the actual box with all the controls etc. When i look at my other forms in solution explorer they all have 3 icons to click (generally). One of the icons takes you to the form designer and you can see/edit the form. My Form1 doesnt have this icon in solution explorer and so i cant bring it up. I really need to see that form because i cant remember what i labelled all the controls and which one is which. I also want to add some more controls as well.

I hope this makes sense. Thanx for the advice earlier :)

AaRoN_P  Tuesday, February 14, 2006 7:28 AM

Hey thx for reply! :)

Yeah tried refresh and show all.. still no luck. I have no idea where this form has gone. I find it even stranger that when i run the code, the form appears in my application and runs perfectly!

Thx again for help.

Aaron

AaRoN_P  Tuesday, February 14, 2006 7:31 AM

Hey,

Try creating a form with the same name, and see if it gives you an error stating that it already exists.

Brian

Brian Mains  Tuesday, February 14, 2006 4:55 PM

Hey

Lol... i think im just gonna give up on this one. Something has obviously gone wrong somewhere. I do remember early in the project i was getting a warning message saying that a resource file is being shared or referred to by more than onesource (along those lines.. i cant really remember the warning so im not 100% what it said).. im guessing that must be the problem... i had to fiddle a bit to get rid of the warning.

Illjust start again... no biggy.. i had onlycreated a few user forms,hadn't really coded much.

Thanks a lot for all your help.

Cheers,

Aaron

AaRoN_P  Wednesday, February 15, 2006 8:07 AM

You can use google to search for other answers

Custom Search

More Threads

• DataGrid BorderColor and Cellcolor
• infinite recursion iniatializing user control
• Range Parameters in my Report Doesn't work
• Problem with Moving Form (without Titlebar) and a Dialog Form
• MessageBox.Show when hosted in IE - where does the focus go?
• Can I set up a button to PRINT just a Panel and its contents not a who form
• How to burn a CD-ROM directly in my program
• Organigrama Visio 2003 (visio drawing control) con BD SQL srever 2005 mediante codigo C#
• How to simulate press system key or handle security dialog
• richTextbox - Highlight complete line