[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

IDE's first form opened

Posted on 2004-04-15
4
Medium Priority
?
173 Views
Last Modified: 2010-04-05
My application has a Data module that has a TADOConnection control which the other forms use to access an Access database.

At design time when I try to open any form that has controls that referance this Modual when this modual is not open before-hand, Delphi (6) bombs out and closes itself.

Till now I have lived with this but now my 'Projects/Options/Main Form' needs to referance this Modual.

Iv noticed that the IDE automatically loads the Main Form when a project is opened. You can imagin the problem this causes. Now whenever I attempt to open such a project, Delphi automatically bombs out!

What do I do?

Is it possible to make the IDE to load up the Modual first before any other form?

How do you make the IDE load a form/modual, other than the Main Form, first when a project is opened?
0
Comment
Question by:ziche
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 17

Expert Comment

by:mokule
ID: 10839859
Hi
You've got two possibilities.
1. In Project/Options/Auto create Forms drag Your data module to the first place.
2. Change order in dpr file
0
 

Author Comment

by:ziche
ID: 10842778
1. The module is already at the top, this doesnt help.
2. How do I do this exactly?
0
 
LVL 17

Expert Comment

by:mokule
ID: 10842926
Hi
Ad 2.
Just Cut Line and copy earlier or later. But it is equivalent to method 1. The only difference is that You can do it without opening project..

What You've got in Your project's *dsk.
Try to change section [Modules]
0
 
LVL 11

Accepted Solution

by:
shaneholmes earned 80 total points
ID: 10846484
ziche,

Initially, in your project source, you will have something like this....

program Project1;

uses
  Forms,
  Unit1 in 'Unit1.pas' {Form1},
  Unit2 in 'Unit2.pas' {DataModule2: TDataModule};

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TDataModule2, DataModule2);
  Application.Run;
end.

Switch it around so that the DataModule is created first....

 Application.Initialize;
 Application.CreateForm(TDataModule2, DataModule2);
 Application.CreateForm(TForm1, Form1);
 Application.Run;


Hope this helps!

SHane
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

650 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