Jump to content
Martyn Spencer

Converting simple VCL form to FMX

Recommended Posts

This is perhaps a slightly naive question, but I would like to convert a very simple form (some checkboxes, edits, memos etc) that only contains VCL controls to an FMX form. I found "Mida Converter" and purchased a license but the developer has been pretty much non-responsive. The software has a registration system that uses non-HTTP/HTTPS ports to handle the process and rather than just shipping a registration code, the process seems to be harder than required. He has not set up the account correctly, so I am unable to complete the activation. So, a refund is now in progress. Long story short, I have not been able to see if it would handle the job.

 

I have a few forms that I could handle by hand, but automation would definitely be preferred. I have a larger project with many forms and many standard controls and if there were a tool to handle most of the UI grunt work for me to worry about code changes, modals etc, it would at least help with the process. Can anyone comment on the way that they handle such simple conversions and whether they have or use a tool that can take a DFM and convert it to an appropriate FMX DFM?

 

Thanks in advance.

Share this post


Link to post

@Angus Robertson

1 hour ago, Martyn Spencer said:

I found "Mida Converter" and purchased a license but the developer has been pretty much non-responsive. The software has a registration system that uses non-HTTP/HTTPS ports to handle the process and rather than just shipping a registration code, the process seems to be harder than required. He has not set up the account correctly, so I am unable to complete the activation. So, a refund is now in progress. Long story short, I have not been able to see if it would handle the job. 

He has been there...

Share this post


Link to post

I am aware that there would be coding changes required, but we are talking about some really simple UI designs that naturally I could do by hand. If there were a tool (and Mida is not that tool given the developer's lack of response), it would be great. Thanks for your feedback so far.

Share this post


Link to post
1 hour ago, David Heffernan said:

I'd be surprised if converting from VCL to FMX was simple enough to be usefully automated.

Fortunately, I wasn't expecting a free ride and full automation, but if there was a tool that could take the basic VCL controls and map properties automatically, it would have been great. I am rapidly coming to the conclusion that it may be better to start from scratch, but I would have been daft to have not asked if there was something that others had found. Thanks for the feedback, though.

Share this post


Link to post

For me the first step is to empty the form.

 

I will create all components in code - I do this manually - but for this I think there should be a tool!

 

Next I will refactor - a lot, the layout of components and the repetitive settings of basic component properties.

So, I am not using any tools, but I can reuse code for laying out components and setting standard properties, much better than before.

Share this post


Link to post

Thanks for the explanation Gustav. I think the approach I am going to take is to create some basic macros to convert property names and work with the DFM files. I have been experimenting and have been able to migrate a relatively simple form by changing property names and removing those that are not directly supported. It's not perfect, but in the absence of anything better, it's probably the route I am going to take.

 

It's genuinely disappointing about Mida Converter. Embarcadero at one point offered it with Delphi for a limited time so I imagine it did some of the grunt-work successfully.

Share this post


Link to post
Guest

I have not touched FMX. But generally, moving between versions of UX libs/tools 20 years apart, the strategy mentioned by Gustav above i would say is a sound one. Trying to "morf" or "patch" will bite back. If it is a complex system perhaps even manually converting all clients' persistence-/metadata could be beneficial.

Share this post


Link to post
13 hours ago, Dany Marmur said:

Trying to "morf" or "patch" will bite back. If it is a complex system perhaps even manually converting all clients' persistence-/metadata could be beneficial.

I am purely concerned only with the controls and their layout. It's clear that the frameworks are quite different and I am under no misapprehension that the entire process could be automated, but converting, say, a VCL TEdit, or a VCL TPanel to a corresponding FMX control should be quite possible and that Embarcadero suggested Mida implies that certain elements can be done. My objective is to find out how much (if any) can be automated. Thanks for the comment, though.

Share this post


Link to post

Anyone in this topic area find any other useful information?

Share this post


Link to post

When I ported my application from VCL to FMX I remade each form by hand. There are 17 forms so it took a while, but this was not the most time consuming part of the porting process by far. The RAD interface makes it quick and easy.

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×