Using drag-and-drop

When you install DataWindow .NET in Visual Studio .NET 2005, a Sybase DataWindow 2.0 tab is added to the Visual Studio Toolbox. If the tab is not visible, see “Installing DataWindow .NET” for how to add it manually.

To add a DataWindow control to a form, expand the Sybase DataWindow 2.0 tab and drag the icon for the control you need onto your form.

You create and design DataWindow objects in DataWindow Designer and save them in a library (.PBL) or deployment library (.PBD). You need to set two properties of the DataWindow control to associate it with a DataWindow object. The LibraryList property is set to the name of the PBL or PBD that contains the DataWindow object, and the DataWindowObject property is set to the name of the DataWindow. Right-click the form to open its Properties window to set these properties, or set them directly in code. You can set all the properties for the control in the form’s Constructor event. The DataWindowControl is not fully created until the form’s Load event is fired,so you should not attempt to call any methods on the control in the Constructor event.

“Adding DataWindows to a form” shows these steps in more detail.