Solved

My first Question

Posted on 2000-05-21
7
142 Views
Last Modified: 2010-04-04
Hello i am Avi, new programer in Delphi.
I am working with the delphi-3.

I understend that the form1 object is creating Atomaticly. And i tryed few time to create insted of Tform1 deferent class name that also inherited from Tform and i like that insted of the defult form1 will be my new name object. I tryed deferent way but i still have the form1 that created automatic. I am sure that it simple but i have no one to asked ? can you help me ? many thanks
Avi    
   
0
Comment
Question by:avi_shina
[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
  • 3
  • 3
7 Comments
 
LVL 1

Expert Comment

by:sistudio041900
ID: 2830366
by default all forms that you add to project are auto-created when your application starts, one of them (first one you created) will be set as main form by default. you can change the forms that are auto created and also the main form form Menu Project/Options...
if you want to create custom forms you eed to download custom form package (but I dont think you asked for custom forms)
sorry if my answer is offtopic to your question, your question isnt so easy to understand.
0
 

Author Comment

by:avi_shina
ID: 2830392
I already anderstand that as default all forms that i add to project are auto-created when my application starts, one of them (first one i created) will be set as main form by default. i also can change the forms that are auto created and also the main form form Menu Project/Options...
But my question is how to define a deferent class insted of Tform1.
Foe example insted of Tform will be    Tmain that inherited also from TForm and the object will be Fmain (insted of Form1).
I hope you anderstand me better...
Have a nice day...
Many thanks
 
0
 
LVL 1

Expert Comment

by:sistudio041900
ID: 2830400
ok I see.

http://www.geocities.com/SiliconValley/Way/9006/cfpack.html

by default you can not derive forms from anything else exept TForm. the url above does allow to us Forms based on your own forms...

is that the answer?
0
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!

 

Author Comment

by:avi_shina
ID: 2830416
No, i maen how can i create the folowing source  
(insted of Tform1 i am giving my name
TMain and insted of Form1 will be Fmain.

like here:



unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;

type
  Tmain = class(TForm)
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FMain : Tmain;

implementation

{$R *.DFM}

end.
0
 
LVL 1

Expert Comment

by:sistudio041900
ID: 2830424
Oh, thats easy...
just change the name of your form to 'Main' with Object Inspector, your PAS source file will be modififed exactly the wayt you wanted.
0
 
LVL 4

Accepted Solution

by:
Romi Kuntsman earned 20 total points
ID: 2830621
You can easily change "TForm1" to "TMain" by changing the "Name" feild of "TForm1" in the object inspector.
0
 

Author Comment

by:avi_shina
ID: 2830705
I KNEW THAT ITS EASY BUT I REALLY SPENT ALOT FOR THIS ...
MANY THANKS
AVI
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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 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