150 likes | 291 Views
Designing OCX Components. Supervised by : Dr. Driss Kettani. Team Members. Hadrouni Najm (Senior Student) El Khalifi Bachir (Junior Student) Rhomri Abdelghani (Senior Student). Outline . Introduction Definition of an OCX component. Why Choosing OCX? The advantages of using OCX.
E N D
Designing OCX Components Supervisedby : Dr. Driss Kettani
Team Members • Hadrouni Najm (Senior Student) • El Khalifi Bachir (Junior Student) • Rhomri Abdelghani (Senior Student)
Outline • Introduction • Definition of an OCX component. • Why Choosing OCX? • The advantages of using OCX.
Outline (cont.) • How to graphically use components. • How to use member functions of a component. • Example of a component • The Calculator
Introduction • Component-based development has become the software concept “du jour” • COM is now a mature foundation for component-based development .
Definition • Object Linking and Embedding (OLE) custom control. • Used by applications running on Microsoft's Windows systems. • Microsoft now calls an OCX an ActiveX control
Definition (cont.) • An OCX or ActiveX control is actually implemented as a dynamic link library DLL module. • Visual Basic and C++ are commonly used to write OCX or ActiveX controls.
Why Using OCX • Smaller, faster descendant of VBX • 3rd version of OCXs • Enhanced for distribution over high- latency networks • Provide integration with web browsers • Incremental Rendering • Big market
Advantages • Services used in a standard way, regardless of location • Any Programming Language • Integrated with Development Tools • Makes software easier to write and reuse.
Graphical use of component ( ex: Visual Basic 6.0) • Reuse of components. • You can add components to every project when needed. • Complementarities between the ActiveX component and the user’s interface • Ability of changing colors • Ability of customizing its size
Graphical use of component (cont.) • Ability of integration in a HTML page example: ocx.html • Example of a program using the graphical calculator as component example: ocx.exe
Using member functions of a component • Implementation of the component • Example of the division using the system error handler: Public Function division_operation(operator1 As Double, operator2 As Double) As Double return a double value On Error GoTo error_msg error handler division_operation = operator1 / operator2 error_msg: if err.number <> 0 then MsgBox Err.Description error display End Function
Using member functions of a component • Implementation of a program using the component Dim myCalc As BachCalc Set myCalc = New BachCalc result = myCalc.division_operation(val1, val2)
Example of how to use it • This executable file illustrates the simplicity of how to use it: Example