I was working on a nice little project last night, consisting of 8 forms.
I then discovered i did not need the 8th form so i closed it.
I then continued debugging until the early hours.
This morning i loaded up the project again but when compiling it complained "No Startup form exists, cannot continue".
When looking at the Form tabs at the top the sequence has changed to Form2,Form3,Form4,Form6,Form1,Form7.
This a;sp means that Form5 has somehow been lost!
Apart from copying all forms over to a new project, what should i do to recover?
No need to panic (just yet). You should check "Explorer" on the "FireFly Workspace" dialog. Is Form5 listed there along with all your other forms? If not, then try re-adding Form5 to your project. You can do this by clicking on the "Project" top menu and select "Add Form". Click the tab "Existing" and select the Form5 disk file.
It is possible that Form5 somehow got removed from your project during the course of your work. When you were creating your Forms did you create one and then use "Save As" to create the other Forms? This can sometimes cause problems because you also need to change the Form Name property otherwise the TabControl will get confused as to what form belongs to what tab.
Lastly, under "Project" menu select "Project Properties". There is a combobox there called "Startup Form/Function:". Select the main form for your project. This is the form that will load and show when your application starts.
If none of the above works, you can zip up your project directory and email it to me and i will see if I can manually fix it.
Cool, Explorer does not show Form5, and strangely i do not actually remember what Form5 was supposed to be for.
So ignoring the Form5 thing, i did as you said with the project properties and voila, it compiles although does generate some errors from where i left off last night.
This is fine, and thankyou so much for the prompt reply.
This follows on from the previous schpiel.
I have realised what form5 was for last night, and definately did require it.
However, when i went to explorer it did not show in the directory view.
So i then attempted to add form (existing tab) and it showed the missing form5. I then attempted to load it, and it told me that it was loaded already.
So being a little fed up, i cancelled that operation and... yuck!
Firefly re-ordered the form tabs, but now their were two form1's.
I somehow managed to get the system back to the one form1 but no form5, and this is how it is this morning.
You may be getting confused between the Form Name and the Disk Name. Every Form has a Name property. That is the text that shows in the Tabs across the top of the designer. When the Form is saved, a disk file is created. By default it will have the same name as the Form Name property but you can change it to whatever you wish.
For example, you create a new Form. It has a Name property of Form1. When you save it to disk, it will default to Form1.frm.
You can get confused when the two names differ. For example, lets continue with the above example. You have a Form called "Form1" saved to disk as "Form1.frm". Lets say that now you decide to change the Name property to "frmStocks" or whatever. Now the Form Name property is "frmStocks" but the disk file name is still "Form1.frm".
You also need to be conscience of the difference between "Closing a Form" and "Removing a Form". Closing a Form simply hides it from the tabs at the top of the designer. Removing a Form will take it out of the project altogether such that it will not form any part of the resulting EXE when the project is compiled.
Lastly, if you are using these Forms as child forms of a TabControl then you need to make sure that the links are correct in the TabControl's "Custom Property".
Things can get confusing if you start renaming Names and disk files and also start closing/removing files.
Ok, i believe i 'closed' form5. However, how do i 'Show' it?
Also. i forgot about the Child thing. I should sort that out tonight.
Thankyou for your help.