To have the CE WinForm Renderer available in the toolbox it must first be added. To do so, perform the following:
Open the toolbox from the View menu.
With a form open in the Visual Studio designer window, right-click anywhere in the toolbox and select Add\Remove items from the context menu to display the Customize Toolbox dialog box.
Browse for the CEWinFormRenderer.dll which is located in the Component Enabler\Bin folder.
Click Open, then click OK to add it to the Toolbox.
The CE WinForm Renderer is a control that can be dragged and dropped onto a System.Windows.Forms.Form control, or any other object capable of being a collection of controls. It is capable of managing an entire session with the runtime host, navigating from ispec to ispec, showing the user each GUI form, with no intervention required by the programmer.
The programmer is able to intercept certain events raised by the CE WinForm Renderer, and take control of the session.
It is possible to have multiple CE WinForm Renderer objects in a client (or on a form), each with its own independent session to the host.
Usage Restrictions
The CE WinForm Renderer is only available for use in .NET languages utilizing the System.Windows.Forms namespace. It does not work with Web forms, you cannot use this in an ASP.NET project.
The form rendering is achieved using the generated VB.NET clients Windows Form for each ispec, hence you must generate the VB forms, even if you do not intend to use the VB.NET client that is supplied.
While the forms are generated using the VB.NET language, the compiled versions of these forms (.dll files) can be utilized by the CE WinForm Renderer in any of the other .NET client languages. For example, you can write you client in C#, J# or managed C++ and VB.NET.
Error Handling
The CE WinForm Renderer is capable of displaying error dialog boxes to the user, however this is only done after a status event has been raised, so that the client program might handle the error situation itself, or allow the CE WinForm Renderer to handle the error.
The AutoConnect method throws an exception if the connection is not successful. The exception contains a CEWindowsAPI.ResponseCode to indicate what error occurred.
Refer to the CEWindowsAPI.ResponseCodes class for the error codes that might be returned. This can be found in the Component Enabler Class Reference.chm help file which is installed in the Doc folder of the Component Enabler installation.
Other errors encountered in the displaying and processing of forms are returned via the status event.