We help IT Professionals succeed at work.

Pls check this out  for me

How to use the Winsock Control in Developer 2000
Forms and How to handle or invoke the Control dynamically?
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2008

Commented:
Done!!!! I think it is ActiveX control.

Creating an ActiveX Control Item
You can create an ActiveX control item by:
? Converting an existing item into an ActiveX control item.
? Using the ActiveX control tool in the Layout Editor.
? Using Create Icon in the Object Navigator.
? Using the Data Block Wizard.
To create an ActiveX control item in the Layout Editor:
1 Invoke the Layout Editor.
2 Click the ActiveX control tool.
3 Click the canvas.
The ActiveX control item is displayed.
4 Double-click the ActiveX control item.
The Properties Palette is displayed for the item.
5 Set the item properties as required.

Inserting an ActiveX Control in an ActiveX Control Item
Inserting an ActiveX Control
1 In the Layout Editor, select the ActiveX Control Item.
2 Click the right mouse button to enable the pop-up menu.
3 Select Insert Object.
4 In the Insert Object dialog box, click the Create Control option button to
display the valid control types.
5 Click a control type.
6 Click OK.
ActiveX Control Properties
Once the ActiveX control is inserted, you may set the following properties:
Property Name Description
OLE Class Determines what class of OLE objects can reside in an OLE
container.You select a specific class if you want to create an
application that allows end users to change the current OLE object in
the OLE container, but want to restrict the end users to creating OLE
objects from a particular class.
Control Properties Displays the specific properties for the current ActiveX control.
About Control Displays information about the control. Please note that this feature
might not be exposed by the control that you are using.
Control Help Displays online Help for the control. Please note that this feature
might not be exposed by the control that you are using.

Importing ActiveX Control Methods and Events Packages
ActiveX controls export interfaces that expose methods and events. Form
Builder imports the methods and events in PL/SQL, enabling you to interact
with ActiveX controls in the native Form Builder environment.
Importing ActiveX Control Methods and Events
1 Select Program??>OLE Importer...
The OLE Importer dialog box appears.
2 Select an OLE Class.
The methods and events packages appear for the selected OLE class.
3 [Ctrl]-click on the desired methods and events packages.
4 Select the Methods check box to import the methods.
5 Select the Properties check box to import the get and set accessors for
properties.
6 Click OK.
In the Object Navigator, notice the newly created packages under the
Program Units node.

Setting and Getting ActiveX Control Properties
Once the ActiveX control is inserted and the methods and events packages
imported, you can interact with ActiveX controls in many ways:
? Setting and getting ActiveX control properties
? Invoking ActiveX control methods
? Responding to ActiveX control events
There are several ways to set and get ActiveX properties values.
Bind Variable Syntax
You can use the bind variable syntax to assign or retrieve property values.
Server_name represents the name of the server. This name is the one you
have selected for the OLE Class property. Property is the name of a specific
property of the ActiveX control. To obtain more information, see the Control
Help property, if available, or the documentation.
:item(?item_name?).ocx.server_name.property
/* Setting an ActiveX control property using bind variable
syntax */
:item(?ActXitem?).OCX.Spindial.spindialctrl.1.Needleposition
:=
:item(?ActXitem?).OCX.Spindial.spindialctrl.1.Needleposition +1;
/* ActXitem is the name of the item,
Spindial.spindialctrl.1 is the name of the ActiveX
control server, and Needleposition is the name of the
property. */
/* The following code also works if your system.cursor_item
is an ActiveX control: */
:form.cursor_item.OCX.spindial.spindialctrl.1.Needlposition :=
:form.cursor_item.OCX.spindial.spindialctrl.1.Needlposition + 1;

Property Accessors (PL/SQL Procedures)
You can set and get property values with the program units, called property
accessor functions and property accessor procedures, generated from the
OLE Importer. Use the property accessor functions to get a property value,
and use the property accessor procedures to set a property value.
Control Properties Dialog Box from the Property Palette
1 In the Object Navigator, double-click the object icon next to the ActiveX
Control Item to display the Property Palette.
2 Click the Control Properties property.
The Control Property dialog box appears.
3 Set the control properties accordingly.
4 Click OK.
/* Getting an ActiveX control property using get accessor*/
tblname varchar2;
tblname := table_pkg.TableName(:item(?Oblk.Oitm?).interface);
/* table_pkg is the name of the program unit created from
the OLE Importer. TableName is the name of the property
accessor. Oblk is the name of the block and Oitm is the
name of the item.*/

Developer/2000: Build Forms II ......................
Invoking ActiveX Control Methods
Methods define actions that the ActiveX control can perform.
How to Invoke a Method?
You can access methods exposed by an ActiveX control with the program
units generated from the OLE Importer. Call any of the methods in any of
the packages available under the Program Units node. To obtain information
on a specific method of an ActiveX control, see the documentation of this
ActiveX control or, if available, the Control Help property.
Example
/* Getting a cell value from a Spread Table ActiveX control
using the GetCellByColRow method provided in the
SpreadTable package */
DECLARE
Cur_Row number;
Cur_Col number;
OLEObj OleObj;
BEGIN
Cur_Row:=SpreadTable.CurrentRow(:ITEM(?BLK.ITM?).interface);
Cur_Col:=SpreadTable.CurrentCol(:ITEM(?BLK.ITM?).interface);
OLEObj:=SpreadTable.GetCellByColRow(:ITEM(?BLK.ITM?).interface,
Cur_Col, Cur_Row);
END;

Responding to ActiveX Control Events
ActiveX controls invoke events. Form Builder exposes these events in the
events package created from the OLE Importer. The events are defined by
the ActiveX control. Each event is associated with a PL/SQL procedure
defined in the events package. The procedures are named according to an
internal numeric representation as defined by the control. When the control
fires an event, the code in the procedure is automatically executed. You are
responsible for providing the code to respond to the event. Type directly into
the event package body and compile the package. The restricted procedure
produced by an event has an application programming interface similar to
the following:
Another method to deal with the event is to add code to the On-Dispatch-Event
trigger.
Restricted or Unrestricted Mode
All event procedures are restricted; that is, go_item cannot be called from
within the procedure code. However, there are instances when the same
event may apply to multiple items and a go_item is necessary; this is the
unrestricted case.
In the unrestricted case, you need to do the following: In the On-Dispatch-Event
Trigger (block or form level), call:
There is no need to explicitly call the event procedure because it will
automatically be called following the On-Dispatch trigger code.
Initialization Events
Initialization events for ActiveX controls do not fire in Forms run-time.
These initialization events are intentionally disabled. Instead, you can use
When-New-Item-Instance or When-New-Record-Instance triggers in place
of the control?s native initialization events.
PROCEDURE /*Click*/ event4294966696(interface OleObj);
FORMS4W.DISPATCH_EVENT(RESTRICTED_ALLOWED);
FORMS4W.DISPATCH_EVENT(RESTRICTED_UNALLOWED);

Handling Exceptions
FORMS_OLE_FAILURE Exception
When a failure is detected in handling an ActiveX control method, an FRM
message appears or the FORMS_OLE_FAILURE exception is raised. When
a FORMS_OLE_FAILURE exception is raised, you can get more detailed
information regarding the cause of the exception by calling the
LAST_OLE_EXCEPTION built-in.
/*
Handling the exception raised as a result of calling:
Var_To_Number(To_Variant(?Jane?));
An exception is raised because Jane is not a number.
*/
DECLARE
errCode PLS_INTEGER;
errSrc VARCHAR2(200);
errDescription VARCHAR2(2000);
errHelpfile VARCHAR2(200);
errHelpContext PLS_INTEGER;
BEGIN
...
WHEN form_ole_failure THEN
errCode := LAST_OLE_EXCEPTION(errSrc,
errDescription,
errHelpfile,
errHelpContext);
-- Inform the user of the problem
MESSAGE(errSrc||?;?||errDescription);
END;

Registering an ActiveX Control
You must register all ActiveX controls. If you install an ActiveX control
using the installation program supplied with the ActiveX control, the
registration is most likely taken care of by the installation program. For
manual registration of ActiveX controls, use regsvr32.exe; this program is
available with Microsoft development tools and from ActiveX control
vendors.
Supporting Files
Most ActiveX controls require a supporting DLL, such as the Microsoft
Foundation Class run-time library, mfc40.dll. The DLL must be in the
\WINDOWS\SYSTEM directory or in the search path. If the DLL is out of
date or missing, your ActiveX control will not register properly. Most
reputable ActiveX control suppliers provide documentation regarding the
version and name of the DLLs required; some even supply and install them
along with the ActiveX controls.
Moving ActiveX Control Files
At installation, the directories in which the ActiveX control is installed are
registered in the Windows Registration Database in Windows 95 and
Windows NT, making the ActiveX control visible to your development
environment. If you move the ActiveX control to a different directory, or
rename the directory, the information in the registry is no longer valid. If you
find it necessary to move the ActiveX control or rename its directory, use
regsrv32.exe or regActiveX.exe utilities provided with most Microsoft
development products to reregister the ActiveX in its new location.
got links for all that?

Commented:

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
Commented:
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange
CERTIFIED EXPERT
Top Expert 2008

Commented:
Sorry, but what about my efforts! This method of "finalizion" is not the best. I have invested time to deliver the answer, but didn't get points.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.