Page 1 of 1

Switching controls automatically

Posted: 24 Nov 2009, 12:46
by rlvision
I have several projects that I would like to switch from using VB controls to your excellent ones. One of the projects has over 300 controls in the main window, and the others have a lot of controls too. Is there any way to easily switch the controls, or would I need to do it by hand for each control.

Or would it be possible to make a utility to do it (not implying that you should do this)? I'm thinking that such a program could modify the .frm files to make the switch by using a list of before and after names, method names, attributes etc.

Re: Switching controls automatically

Posted: 24 Nov 2009, 13:56
by TiKu
There is no such tool.
In fact, doing an automatic conversion would be dangerous. My controls are no simple replacement controls, that are designed to behave the same as the original controls. They may behave different and some features of the original controls don't have a direct pendant in my controls. For instance you cannot set list view columns and image lists at design time, this must be done at runtime (e. g. in Form_Load). A conversion tool cannot cover these differences.

Re: Switching controls automatically

Posted: 24 Nov 2009, 16:02
by rlvision
Ok, I accept that more advanced controls can't simply be replaced, but for example a command button does not sound like it should be too much problems. Of course you would need to test afterwards to make sure that everything works like intended.

And a utility could still make the replacement so that controls maintain their original size and most properties, and perhaps also point out the things that need to be inspected by hand. It would not be fully automatic, but still help you to get started.

Or do you think such a utility would be completely impossible to make any good?

Re: Switching controls automatically

Posted: 24 Nov 2009, 16:20
by TiKu
It would require much time to write and maintain such a tool. I'm short of time and prefer to invest it into the controls instead of tools that have little value compared to the work they generate.

Re: Switching controls automatically

Posted: 24 Nov 2009, 16:55
by rlvision
Like I said in my first post, I am not asking you to do this. I just wanted your input on how feasible such a utility would be. (I'm thinking about doing it myself, since I have projects with a lot of controls.)