Jump to content
Ian Branch

Project always opens with .dpr file..

Recommended Posts

Hi Team,

D10.4.1, Win 10.

For some reason I have a project that insists on opening the project file in the IDE rather than the MainForm I would prefer.

I deleted the following files:  .dproj, .dproj.local, .identicache, .otares.  There is no .dsk.

The double clicked the .dpr and still it opened the project file rather than the MainForm.

I tried closing the project file and then saving from the IDE with just the Mainform open but that didn't work. 

There is obviously some way to make it not open the .dpr and to open the MainForm but I can't find it.

Help!

 

Regards & TIA,

Ian

Share this post


Link to post

How are your settings about saving the project desktop?

 

Is the MainForm auto-created in the dpr?

Share this post


Link to post

HI Uwe,

I have never knowingly changed them.  All my other projects open at the Mainform.  What should I specifically look at/for?

Yes, the Mainform is auto-created in the dpr.

    Application.MainFormOnTaskbar := True;
    Application.CreateForm(TMainForm, MainForm);
    Application.Run;

Regards,

Ian

Share this post


Link to post

I have it.  For some reason Tools|Options|IDE|Save project desktop when closing, was not checked.

Don't know when that happened, this project has seemingly always been this way.

Oh well.  All sorted now.

Thanks Uwe for the pointer.

 

Regards,

Ian

Share this post


Link to post

I have related (opposite) question: how to prevent Delphi from showing main form of the project on project opening? I would prefer not to show anything.

Share this post


Link to post
Guest

my tip:

  1. create a new project (empty) - remove the form1
  2. add your units/forms as expected, the "form1" at first
  3. open "Project Options", set "form1" as your form main, and others as no-auto-create, by default
  4. save new project.
  5. verify if "Save files when compiling or running" and "Save project desktop when closing" stay checked!
  6. close your project
  7. now, unmark "Save files when compiling or running" and "Save project desktop when closing"
  8. close IDE!
  9. Open the IDE and your project!
  10. if dont work, burn your computer!!! :classic_biggrin:

 

NOTE: as you should know, some files is re-created by IDE/Compiler, then, see on HELP System, and delete it!

 

the Embarcadero, save some user-files on "C:\Users\<<USER WINDOWS>>\AppData\Roaming\Embarcadero\BDS\20.0 ---> *.dsk files and others - delete it here!

Edited by Guest

Share this post


Link to post
Guest

is it possible you export and zip the "Registry key" for analize?

Computer\HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\<<nn.n>> <<--- your version here!

 

using 7Zip  ( .7z extension ) size < 2.3MB)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×