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 8617217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:48:12+00:00 2026-06-12T05:48:12+00:00

I am creating a VCL forms application with multiple forms. I have created a

  • 0

I am creating a VCL forms application with multiple forms. I have created a new form called formCreateAppointment.

I am trying to load the form via this code in a menuItem:

formCreateAppointment.Show();

I am getting this error:

E2451 Undefined symbol ‘formCreateAppointment’

Do I have to declare this form as a ‘global’ object or something similiar?

Thanks

More Info

The form ‘formCreateAppointment’ is under the Project->Options->Auto-create forms. When I use the code:

formCreateAppointment->Show();

My code will not compile and I get the following error:

E2451 Undefined symbol ‘formCreateAppointment’

  • 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-12T05:48:13+00:00Added an answer on June 12, 2026 at 5:48 am

    When you create a new Form class in the IDE, the generated .hpp file contains a global pointer for you, eg:

    #ifndef Unit2H
    #define Unit2H
    
    #include <Classes.hpp>
    //...
    
    class TformCreateAppointment : public TForm
    {
        //...
    }; 
    
    extern PACKAGE TformCreateAppointment *formCreateAppointment; // <-- here
    
    #endif
    

    It sounds like you have not #include‘d that .hpp file into your main code, eg:

    #include "Unit2.hpp" // (or whatever you decided to name that Form's unit as)
    

    If you set that Form to be Auto-Created in the Project Options, that global pointer will be automatically instantiated at program startup for you (by inserting a call to Application->CreateForm() in your project’s WinMain() function). Otherwise, you have to instantiate it manually in your code using the new operator instead.

    Either way, the variable is a pointer. VCL objects cannot be instantiated on the stack, only the heap. You have to use the -> operator to access members of the Form object, eg:

    formCreateAppointment->Show(); 
    

    If you want to use the . operator instead then you have to dereference the pointer first:

    (*formCreateAppointment).Show(); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I creating a web application using JSF,Hibernate,Spring. I have added a filter for checking
We have a VCL Delphi 2005 application, and would like to use DevExpress's XtraReports
i was created a nonvisual vcl component in delphi and I'm trying to make
Creating column at runtime, with DataTemplateSelector. Have exception at XamlReader.Load: System.Windows.StaticResourceExtension. How can i
Creating a voting system just like stackoverflow. Questions like this have been asking several
Creating a class at runtime is done as follows: klass = Class.new superclass, &block
(creating a separate question after comments on this: Javascript redeclared global variable overrides old
Creating a server-side socket will fail if I'm trying to use the same port
Creating a JApplet I have 2 Text Fields, a button and a Text Area.
Creating a simple RPG game, first time using XNA. Trying to get my character

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.