Solved

How to change the default form that Delphi starts with? Can it be done, or not?

Posted on 2006-07-17
5
200 Views
Last Modified: 2010-04-16
Hi all

Can the default form that Delphi starts with be changed, if so, how, if not then just a simple no will solve my question too, thxxxx


Fdehell
0
Comment
Question by:fdehell
  • 3
  • 2
5 Comments
 
LVL 26

Expert Comment

by:Russell Libby
ID: 17124168

Are you talking the IDE, or an application that you are working on (its unclear)?  If talking about an app, then yes, but you have to do it in the project source. The main form is determined by the first form that the application creates.

Russell

Example that switches the main form based on passing a command line param of "FORM2".

program Project2;

uses
  Forms,
  Unit1 in 'Unit1.pas' {Form1},
  Unit2 in 'Unit2.pas' {Form2};

{$R *.RES}

begin
  Application.Initialize;
  if (ParamStr(1) = 'FORM2') then
  begin
     Application.CreateForm(TForm2, Form2);
     Application.CreateForm(TForm1, Form1);
  end
  else
  begin
     Application.CreateForm(TForm1, Form1);
     Application.CreateForm(TForm2, Form2);
  end;
  Application.Run;
end.
0
 
LVL 1

Author Comment

by:fdehell
ID: 17124386
Well I am talking about the Delphi IDe, i mean, just when you start Delphi, it creates a main form, that always for instance has the same icon, which i dont like, and so i always have to change it myself every time AFTER i start delphi, i was kinda wondering where the default form was stored in which directory etc, but then i reckon one cannolt change the default form that delphi starts with, prior before Delphi starts? I mean, it would have been a blast if delphi would start with MY icon instead of the standard delphi icon...

Working with your code now Russel, thx heaps

Frank
0
 
LVL 26

Accepted Solution

by:
Russell Libby earned 500 total points
ID: 17124536
Frank,

You can use the Object Repository in the IDE to create a new project, add the project to the repository, then set the project as the default to use when you select File | New Application. There are a number of options available, so rather than go into detail on it, check out the help for the "Object Repository" and let us know if you have question / difficulties.

Russell
0
 
LVL 1

Author Comment

by:fdehell
ID: 17124705
Strangely enough i was working with a new form and it suddenly displayed my own icon haha, apart from this, i have done what you said Russel, and voila problem fixed thx heaps Russel

Frank
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 17124737
Very welcome,

Russell
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
FMX and jaudiotracker playing memory stream 29 97
SUM 2 INTEGER ARRAYS INTO 1 10 111
Base1 Encode/Decode 3 85
Firemonkey Queue list 1 25
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question