Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7689675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:13:09+00:00 2026-05-31T20:13:09+00:00

I have a procedure with Sender: TObject paramater procedure TForm1.FormCreate(Sender: TObject); How can I

  • 0

I have a procedure with Sender: TObject paramater

procedure TForm1.FormCreate(Sender: TObject);

How can I call this procedure again?

This version does not work:

TForm1.FormCreate(Sender: TObject);

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:13:10+00:00Added an answer on May 31, 2026 at 8:13 pm

    I assume that you wish to call the procedure FormCreate of an instance of a TForm1.

    You can do FormCreate(Self) or FormCreate(nil) (or you can pass any TObject instance as the parameter) if you are inside the TForm1 class. Otherwise, you have to write Form1.FormCreate(Self) or Form1.FormCreate(nil) or similarly, where Form1 is the appropriate instance of the TForm1.

    At any rate, it is not particularly ‘elegant’ to call the FormCreate procedure at later times. Indeed, the name clearly suggests that the procedure is called when the form is created.

    If a particular piece of logic of your FormCreate method is needed at other stages and you simply do not want to duplicate code, you should probably implement that piece in the form of a separate method (procedure or function) and call it in FormCreate as well as in other parts of your program, as necessary.

    But then, you might be better off moving that part of your business logic from FormCreate at all. What we typically do in FormCreate is create/initialise objects that are later uninitialised/destroyed in FormDestroy (if needed). So, think carefully what you are doing in FormCreate, maybe there’s a better, logically more appropriate place for some or all of the actions you’ve implemented in this method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); var begin
i have a method: procedure Frob(Sender: TObject); that i want to call when i
I have procedure TMainForm.FormCreate(Sender: TObject); begin DragAcceptFiles (Handle, True ) ; end ; but
this code works fine: procedure TForm2.Timer1Timer(Sender: TObject); var Text: string; begin SetLength (Text,555); GetWindowText
I have used the following code to create the XML Document : procedure TForm1.btnCreateXMLClick(Sender:
Take the following code as a sample: procedure TForm1.Button1Click(Sender: TObject); var Obj: TSomeObject; begin
I have a procedure named XYZ(sender:TObject) in delphi. There is one button on my
So if a language provides higher order procedure then I can have procedure that
I have this procedure i my package: PROCEDURE pr_export_blob( p_name IN VARCHAR2, p_blob IN
I have problems sending using a Dll procedure with parameters, im not allowed to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.