Solved

My first Question

Posted on 2000-05-21
7
140 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
  • 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Internet Explorer View Settings Question 15 111
find a node in VST 2 68
Convert MS Word document to a PDF file 9 78
enhance the following code 3 31
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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 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