Switching controls automatically

The place for programming-related topics.
Post Reply
User avatar
rlvision
Lieutenant
Posts:18
Joined:07 Oct 2009, 15:40
Location:Sweden
Contact:
Switching controls automatically

Post by rlvision » 24 Nov 2009, 12:46

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.

User avatar
TiKu
Administrator
Administrator
Posts:832
Joined:28 Sep 2004, 21:10
Location:Unterföhring
Contact:

Re: Switching controls automatically

Post by TiKu » 24 Nov 2009, 13:56

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.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!

User avatar
rlvision
Lieutenant
Posts:18
Joined:07 Oct 2009, 15:40
Location:Sweden
Contact:

Re: Switching controls automatically

Post by rlvision » 24 Nov 2009, 16:02

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?

User avatar
TiKu
Administrator
Administrator
Posts:832
Joined:28 Sep 2004, 21:10
Location:Unterföhring
Contact:

Re: Switching controls automatically

Post by TiKu » 24 Nov 2009, 16:20

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.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!

User avatar
rlvision
Lieutenant
Posts:18
Joined:07 Oct 2009, 15:40
Location:Sweden
Contact:

Re: Switching controls automatically

Post by rlvision » 24 Nov 2009, 16:55

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.)

Post Reply