DLL vs. OCX

Hello all, Whenever someone here talks about creating an automation server, they talk about creating an OCX. I have written a few COM DLLs (not OCXs!) for our Navision system (which work just fine), so I was wondering whether there was any significant difference between using an OCX or a DLL. AFAIK, OCXs are primarily for custom controls that can be put on a form, while a (COM-) DLL just serves some invisible objects. Since Financials 2.60 (don’t know about other versions) doesn’t support custom controls on forms, using an OCX or a DLL should just all be the same. Especially since in VB6 both types can be created in just a few minutes (not counting the actual implementation ). Is it just “common usage” to say “OCX”, or am I missing something here? Best regards, – Heinz Herbeck Waagner-Biro AG, Vienna, Austria

hi, You are absolutely right. Here in Navision 3.x you can not paste the OCX on the form, But Navision 3.x provide the datatype OCX to use the methods and propery of OCX controls similarly the DLL. For the exapmple you can use the Mapi control OCX to send the mail instead of using the Automation. I mean to say you can effectively use all those OCX in Navision 3.x which does not have visual interface even in VB e.g. MAPI control, which you paste on the Form in VB but runtime it’s not visible.

Well, right - Navision provides a way to use both OCX and DLL/EXE components by supporting variables of type OCX and Automation, respectively. This allows you to use exisiting OCX components. But if you find yourself faced with the task of writing a new component, would you rather create a DLL or an OCX, and why? Regards, – Heinz Herbeck Waagner-Biro AG, Vienna, Austria