I had an interesting chat today about a topic that's been an issue for Indy in the last couple of months. Firstly, let me say that the Indy Library does not have any dependencies on the Delphi RTL any longer. The Indy Core Team implemented custom RTL routines, so we no longer depend on the Borland-Namespace.
However, a lot of people still are surprised that you can do Winforms development with Indy. Why shouldn't you? All Indy stuff for .NET are assemblies, no different from any other 3rd party assembly. The only difference is the
design-time support. VCL.NET does have design-time support, Winforms does not.
Just in case: Design-time support means that the components appear on the Tool Palette, you can drop them on a form and change properties during design-time. In Winforms we do currently not have that capability.
There are many reasons for this, but the most striking one is that the property editors which we have for VCL would have to be completely rewritten for Winforms, for which we currently do not have the manpower. We looked into it and decided to spend resources on other issues.
However, even if you do not want to write runtime code when using Indy components, I might have a workaround for you!
GExperts, a 'couple' (
of wonderful IDE plugins), helps you in that regard.
Simply
- create a VCL form,
- drop any Indy component on the form,
- set the properties to your liking,
- right-click the component and
- chose the command "Components to Code".
If you have an older version of GExperts you may find that item in the GExperts menu. Thus, you will end-up with the code to create that exact component in the clipboard. The final step is to paste that code into your Winforms application.
Here you see the popup menu with the GExpert item "Components to Code"

This generates the following source code:

Of course, this does not help you at all when using C#. I am very aware of that. However, as I was talking in the chat today I thought that more people could profit of the result of that chat.