How about creating them at run-time ?
Well, you would have to set properties like .Left, width, height ...
cheers
Wolfgang
Before your application grows too big and it's too late to make the change,
I suggest looking in to using packages. If most of the application is the
same for both versions, then you can put the differences in different
packages.
You will still need one unit for each form, and one unit for each
datastructure unit, but the rest can be the same.
What I tend do is put the code common to both units into a third package,
then use that package for different "implementation packages". That way, if
a third version pops up, I'm already prepared for it. It also means that
only the differences betweeen the versions are kept in the "implementation
packages", and all similarities are kept in one "base package".
I know it sounds complicated, but once there, developement is actually more
efficient and more maintainable.
The compiler accepts it, no problem. But the IDE will get massive
indigestion from it. You have to keep in mind that the code in your
unit does not execute at design-time, and the IDE does not evaluate
conditionals in it, as far as i know. So, what DFM should the IDE load?
It expects a $R *.DFM line anyway, not a specific filename.
--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be