Frage

For my first question ever on Stack Overflow I have to ask you about this issue I'm having with Delphi 2007.

At the startup of my project, the IDE always open a set of forms from my project.

For example, let's take a project where I have 50 forms. Every time I open the project, the IDE will open some of these forms (they are always the same one). My question being : Is there a list somewhere in the options where you can put a list of form to automatically open in Delphi on startup? I've been looking on 5 different forum about this and I've never found anything. Is this some sort of configuration?

War es hilfreich?

Lösung

Go to Tools->Options from the main menu.

Check the Autosave options->Project desktop item, and click OK to apply the change. Close the dialog.

Go back to your project. Close all the files you don't want to open any more when the project is first loaded, then use File->Save All from the main menu. (The quickest way to close the file is to right-click the editor tab at the top and choose Close Page from the context menu.)

The IDE will remember the forms you have open when you save the project, and will reopen them the next time the project is loaded. To make sure they're only the ones you want, close all of the forms you don't want to be open before exiting.

You can remove forms that are being auto-opened by simply making sure they're closed when you next save the project. (And conversely, you can add forms that you want to be auto-opened by just making sure they're open when the project is saved.)

Andere Tipps

It IS possible to have it open only the forms you want the same every time regardless of how you left the project on the last save!

1) Go to Tools-Options from the IDE's menu.

2) In the Environment Options tick the option 'Project Desktop', and click OK.

3) Go back to your project. Close all forms, and only open up the forms that you want to show when the project is opened.

4) Save the project.

5) Close out of Delphi, and Re-open Delphi

6) Go back into Tools-Options and UNTICK the option 'Project Desktop'.

Now you should be able to open up your project and have only the forms you want open show. Even if you open up more forms and then save and close - it should only open up the forms in step (3) as any changes made afterwards won't be changed again as we've unticked the option in step 6!

If you leave Project Desktop ticked you run into the problem of it remembering whatever forms were left open from the last time the project was opened - so the trick is to only have this ticked whilst setting up your preferred 'layout', and then untick it afterwards.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top