Thursday, April 28, 2011

Possible to embed WinForms into a VCL Delphi application?

We have a VCL Delphi 2005 application, and would like to use DevExpress's XtraReports components, which is for .NET. Is it possible to use it without converting the VCL Delphi application?

Perhaps by converting the components as COM objects, or creating a WinForms application, and somehow embed the form into a VCL form?

Doesn't sound too easy, but just want to know what possible solutions are available.

From stackoverflow
  • Robo, you can use the RemObjects Hydra 3.0 components, to integrate Delphi and .Net technologies using plugins.

  • Yes, its possible. You need to host the CLR from your Delphi app to do it.

    There are some examples on MSDN on how to do this (the examples are using C++ though, so you would need to translate)

    Or you could use the Jedi jclClrHost unit from the JEDI site. (see this question for some details)

    Warren P : I didn't know about jclClrHost. Nice. thank you. I still think that it's almost always a bad idea to do this, especially if only to consume a standard .net framework class or use a .net component or toolkit that has native equivalents, and not because you have to interoperate with a large proprietary software framework in .net.
  • This is a bad idea. Yes you can do this. No you should not.

    First look at Developer Express "Express Printing System", and Fast Reports. The first is a document/component print solution, the best one out there, and the latter is the best database reporting component set out there, which also handles non-database (code-based) reporting/printing with great flexibility and style.

    I have first-hand experience using Express Printing System to print spreadsheet documents that are based on Developer Express Spreadsheet component, and the combination is very powerful, and easy to use. Both Developer Express and Fast Reports have very active development, and good technical support.

0 comments:

Post a Comment