?
Solved

IDE's first form opened

Posted on 2004-04-15
4
Medium Priority
?
171 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses
Course of the Month13 days, 2 hours left to enroll

777 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