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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:33:20+00:00 2026-05-27T07:33:20+00:00

Whatever component that will be created in c++ builder will be assigned TComponentName. For

  • 0

Whatever component that will be created in c++ builder will be assigned TComponentName.
For example when I create a form and assign it MyWidget it then the class that inherits TForm
gets class TMyWidget : TForm{} form. With spy++ like inspectors you can see registered class names of your apps.

Concerning this my question is the following.

  • Is it possible at all and then how to create our forms, components
    with our desired name(excluding prefix T)?

The way I did it I created VCL Forms App and saved it. Then replaced TForm1 with my own desired classname, say, in my case WidgetCl0x01 in the .h,.dfm,project source file in __classid() arg but there was compilation and linking problems!

Show me directions on how to achieve this not just by changing VCL source !

  • 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-27T07:33:21+00:00Added an answer on May 27, 2026 at 7:33 am

    You can override the virtual CreateParams() method to change the classname that is assigned to the HWND that is allocated for the TForm window, eg:

    void __fastcall TMyWidget::CreateParams(TCreateParams &Params)
    {
        TForm::CreateParams(Params)
        StrLCopy(Params.WinClassName, _D("WidgetCl0x01"), (sizeof(Params.WinClassName) / sizeof(Char)) - 1);
    }
    

    Use the Name property in the Object Inspector to change the class name of the TForm class itself in your code, don’t try to adjust it by name. Just know that it will always be prefixed with a T, you cannot avoid that unless you disable the TForm‘s DFM and create all of its content by hand in code, then the classname will not matter.

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

Sidebar

Related Questions

I'm trying to create a sub-class of the JButton component that will enable or
For whatever reason, our company has a coding guideline that states: Each class shall
My Case: I'm working on a system that will need to create various X12
I'm trying to write a simple component that will allow you to embed one
For whatever reason, I have a lot of clients that have existing data that's
I have a object that is a private in my class. If that object
We are planning to build a new integration component that can provide us access
Publishing a component which has multiple dynamic templates will usually result in all the
I have a class that manages keyboard input and fires off KeyPressed , KeyReleased
What most people mean by autocomplete is that the app has a textview/searchbar/whatever which

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.