Presentation is loading. Please wait.

Presentation is loading. Please wait.

Designing OCX Components Supervised by : Dr. Driss Kettani.

Similar presentations


Presentation on theme: "Designing OCX Components Supervised by : Dr. Driss Kettani."— Presentation transcript:

1 Designing OCX Components Supervised by : Dr. Driss Kettani

2 Team Members  Hadrouni Najm (Senior Student)  El Khalifi Bachir (Junior Student)  Rhomri Abdelghani (Senior Student)

3 Outline Introduction Introduction Definition of an OCX component. Definition of an OCX component. Why Choosing OCX? Why Choosing OCX? The advantages of using OCX. The advantages of using OCX.

4 Outline (cont.) How to graphically use components. How to graphically use components. How to use member functions of a component. How to use member functions of a component. Example of a component Example of a component  The Calculator

5 Introduction Component-based development has become the software concept “du jour” Component-based development has become the software concept “du jour” COM is now a mature foundation for component-based development. COM is now a mature foundation for component-based development.

6 Definition Object Linking and Embedding (OLE) custom control. Object Linking and Embedding (OLE) custom control. Used by applications running on Microsoft's Windows systems. Used by applications running on Microsoft's Windows systems. Microsoft now calls an OCX an ActiveX control Microsoft now calls an OCX an ActiveX control

7 Definition (cont.) An OCX or ActiveX control is actually implemented as a dynamic link library DLL module. 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. Visual Basic and C++ are commonly used to write OCX or ActiveX controls.

8 Why Using OCX Smaller, faster descendant of VBXSmaller, faster descendant of VBX 3rd version of OCXs3rd version of OCXs Enhanced for distribution over high- latency networks Enhanced for distribution over high- latency networks Provide integration with web browsers Provide integration with web browsers Incremental Rendering Incremental Rendering Big marketBig market

9 Advantages Services used in a standard way, regardless of location Services used in a standard way, regardless of location Any Programming Language Any Programming Language Integrated with Development Tools Integrated with Development Tools Makes software easier to write and reuse. Makes software easier to write and reuse.

10 Graphical use of component ( ex: Visual Basic 6.0) Graphical use of component ( ex: Visual Basic 6.0) Reuse of components.Reuse of components. You can add components to every project when needed.You can add components to every project when needed. Complementarities between the ActiveX component and the user’s interfaceComplementarities between the ActiveX component and the user’s interface Ability of changing colors Ability of changing colors Ability of customizing its size Ability of customizing its size

11 Graphical use of component (cont.) Ability of integration in a HTML page Ability of integration in a HTML page example: ocx.html ocx.html Example of a program using the graphical calculator as component Example of a program using the graphical calculator as component example: ocx.exe ocx.exe

12 Using member functions of a component Implementation of the component Implementation of the component Example of the division using the system error handler: 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

13 Using member functions of a component Implementation of a program using the component Implementation of a program using the component Dim myCalc As BachCalc Set myCalc = New BachCalc result = myCalc.division_operation(val1, val2)

14 Example of how to use it This executable file illustrates the simplicity of how to use it: This executable file illustrates the simplicity of how to use it: Example


Download ppt "Designing OCX Components Supervised by : Dr. Driss Kettani."

Similar presentations


Ads by Google