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

  • SEARCH
  • Home
  • 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 9032107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:53:56+00:00 2026-06-16T07:53:56+00:00

Is there a way to create forms dynamically by only their names; The concept

  • 0

Is there a way to create forms dynamically by only their names;
The concept goes like this. I have a main form, and by some user selection, a number of predefined forms must be created and docked on tabitems on a pagecontols on the main form.
I do know the names of the forms and i do know when to create each one of those, but i would like to know if a better way of creating these forms by a single procedure call, and not having all of these information in my code.

Its Delphi XE3 firemonkey, on win 7.

Thanks in advance for any help

  • 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-06-16T07:53:57+00:00Added an answer on June 16, 2026 at 7:53 am

    Apparently on Firemonkey Delphi doesn’t automatically register form classes to be available by name, so you’ll first need to add something like this to the end of the unit that holds your form class:

    unit Form10;
    [ ... ]
    // Right before the final "end."
    initialization
      RegisterFmxClasses([TForm10]);
    end.
    

    This will automatically register TForm10 so it’ll be available by name. Next you can use this kind of code to create a form at Runtime by it’s class name:

    procedure TForm10.Button1Click(Sender: TObject);
    var ObjClass: TFmxObjectClass;
        NewForm: TCustomForm;
    begin
      ObjClass := TFmxObjectClass(GetClass(ClassName));
      if ObjClass <> nil then
      begin
        NewForm := ObjClass.Create(Self) as TCustomForm;
        if Assigned(NewForm) then
          NewForm.Show;
      end
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create a form that changes dynamically. I have a form
Is there a way to create a layout like the notification bar (the sliding
Is there a way to dynamically create an object using a string as the
I'd like to create a form where I have checkboxes, and when clicked, they
I would like to create a few panel dynamically in my window form application.
I have multiple forms that are dynamically created with different input names and id's.
Is there a way to create a callback function that fires when a list
Is there any way to create a dynamic Pinterest button? I'm trying to add
Is there a way to create a StringBuilder from a byte[] ? I want
Is there a way to create a NuGet package where when the package is

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.