Convert Delphi .NET application to WIN32

Posted on 2007-10-10
Last Modified: 2013-11-23

If I have created an application using delphi as a

VCL Forms Applicayion - Delphi for .NET

is there an easy way to convert this application to

VCL Forms Application for WIN32


Question by:elschott
    LVL 21

    Expert Comment

    It should be simple, but I tried a couple of different ways with no joy.  I will ask CodeGear and see what they have to say.
    LVL 22

    Accepted Solution


      Yes you can do that, but it's depend on the complexity of the .net application you made, and if you used .Net specific code you have to changed to it's corresponding win32 code.

    to convert an VCL.Net application to Win32 VCL Application you have to do the following:

    1. Create a backup from the project to anther folder.
    2. Convert all the forms extension name from .nfm to .dfm.
    3. Open all the units and change "{$R *.nfm}" to "{$R *.dfm}"
    4. At the uses clause, change the namespaces to it's unit name in win32, for example:
     "Borland.Vcl.StdCtrls" will be changed to be  "StdCtrls"
    5. Remove "System.ComponentModel" from the uses.
    6. Delete the project.bdsproj
    7. Open the Project.dpr and do these changes:
       7-1. delete all the code {$REGION 'Program/Assembly Information'} and {$ENDREGION}
      7-2. delete [STAThread] line.
      7-3. delete the above lines that started with {%DelphiDotNetAssemblyCompiler ..}
      7-4. Remove all the used name spaces in uses clause such as:

    Now go to Delphi and open the project, if it prompt to you to convert the application choose "Win32"

      Save the application and you will have now Native win32 :-)

    Mohammed Nasman

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    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 The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
    This video discusses moving either the default database or any database to a new volume.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now