I have a set of custom controls. I would like to know your opinion if it is better to compile in a single ocx or separately. What advantages or disadvantages?
I would not make an ocx out of them for quite a while and just use them as user controls until you are very happy with the api interface and have figured out and debugged all the features you want in the long term. once that part is complete, then the ocx question.
really large controls that are very complex I would make standalone ocx
a group of smallish controls I would bundle all together into one
once you start distributing multiple projects using the same ocx, it can get annoying if you have to break compatibility for any reason. Then you all of a sudden
have to recompile everything that used it. thats why i opt for a long user control period. Even now some user controls even after a couple years I do not convert
because I like to be able to keep customizing them to the current program.
if its only for personal small projects, then it is easier. I have one activex dll with loads of debugged classes that I only use for one off projects. its a full runtime
of handy stuff and only project compatibility set so I can adapt it or add on to it at any time, I never use it for anything I distribute and instead rip the classes out
of it into other dlls or compile in if the need arises. that way I have a foundry where I can forge and refine in a test environment.
so depends on the size, complexity, if your distributing them, if the api interface is set in stone yet, how well debugged they are, do they benefit from customization per app etc.
switching to dll/ocx to early gives headaches would be my main warning.
I have a set of custom controls. I would like to know your opinion if it is better to compile in a single ocx or separately. What advantages or disadvantages?
Thanks for your suggestion.
Single ocx.
Originally Posted by Episcopal
What advantages or disadvantages?
The advantage is that it is only one ocx.
Disadvantages: it depends on your case, but most probably none.
Yeah dz32 brought a lot of this out, but my question would be, "What do you intend to do with these controls?"
If you only intend to use them in your own project(s), I see no reason to make an OCX at all. Just include the controls in your project(s) on an as-needed basis. That makes distribution easier, and obviates any need to worry about registration of the OCX.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Yeah dz32 brought a lot of this out, but my question would be, "What do you intend to do with these controls?"
If you only intend to use them in your own project(s), I see no reason to make an OCX at all. Just include the controls in your project(s) on an as-needed basis. That makes distribution easier, and obviates any need to worry about registration of the OCX.
Yes, it's for my own projects. But if I put everything in the EXE, and if I need to fix any bugs, then I'll have to update the executable every time.
When it comes to registration, there is the SXS technology.
Umm, to fix bugs, you've still got to redistribute something. With everything in the EXE, you've got the possibility of a portable application (no installation needed). But, to redistribute an OCX, you've really got to re-install everything or else teach your users how to re-register their new OCX (which I wouldn't recommend).
Addendum: Here's a screenshot of my primary project (literally 100s of modules):
Last edited by Elroy; Oct 6th, 2021 at 12:18 PM.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Unless you intend to use all these controls in only one program, putting them in an ocx has a huge advantage of reusability (and maintenance) over putting them in source code in every exe project.
About the idea of "easier to debug" if the controls are split into different ocx files, I don't see why it would be easier to debug, it is the same.