[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Convert Delphi .NET application to WIN32

Posted on 2007-10-10
2
Medium Priority
?
763 Views
Last Modified: 2013-11-23
Hello

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

Thanks

Jake
0
Comment
Question by:elschott
2 Comments
 
LVL 21

Expert Comment

by:developmentguru
ID: 20056679
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.
0
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 2000 total points
ID: 20056868
Hello,

  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:
  System.Reflection,
  System.Runtime.CompilerServices,
  System.Runtime.InteropServices

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 :-)

Regards,
Mohammed Nasman
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Loops Section Overview
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month17 days, 15 hours left to enroll

830 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