[Webinar] Streamline your web hosting managementRegister Today


Have Delphi Prism form into Delphi

Posted on 2010-04-06
Medium Priority
Last Modified: 2013-11-23
Hello experts.

I have build a big program with delphi (Delphi 2009).

Now I have received few components that are .NET components for our video output.

Can I build a project with a single form in Delphi Prism (so I can make use of the .NET components), and then have delphi 2009 or delphi 2010 "see" this form and have it either as separate window or as a panel in an existing delphi window?
Question by:Ioannis Anifantakis
  • 4
  • 2
LVL 21

Expert Comment

ID: 30075115
Conceptually you should be able to do this, but I am not sure of the specifics at the moment... I thought you might be able to start on it if I gave you some ideas though.  Within Delphi Prism you can feel free to create your form.  Once you have it you can wrapper it in an assembly (make any methods you would require to allow a user to create the form, display it, re-parent it (important).  Any .NET assembly can be imported into a Delphi application.  You would then use Delphi to call the appropriate methods to create the form and either display it (use it as-is), or re-parent it to one of your own Delphi forms or controls.

If you are able to make it work based on this, very nice.  If not, let me know and I will try to create an example.

Author Comment

by:Ioannis Anifantakis
ID: 30101500
My problem is that I don't know how to insert in delphi for win32 a managed dll written in .NET
LVL 21

Accepted Solution

developmentguru earned 2000 total points
ID: 30114415
If you make your code into an assembly then you can import it into Delphi.  To do this:

1) Component | Import Component
2) Choose Import .NET Assembly and hit NEXT
3) Choose your assembly from the list and continue to follow the import wizard.

This will create a Delphi unit that lets you use the assembly like it is part of the Delphi program.

As far as I know this is the easiest way to interface the two.
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions


Author Comment

by:Ioannis Anifantakis
ID: 30121526
This way unfortunatelly doesn't import managed DLLs (.NET assemblies), but only the normal ActiveX dlls.

Author Comment

by:Ioannis Anifantakis
ID: 30121656
However I fell into this site, and from the first impression seems to work...


Author Comment

by:Ioannis Anifantakis
ID: 30121885
Oh wait, I am on my Delphi7 PC at the moment,
I will check if your solution on the Delphi2009 PC and will let you know

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

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…
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…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…
Suggested Courses
Course of the Month10 days, 1 hour left to enroll

591 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