Using Microsoft Visual Basic  Previous topicNext topicFirst topicLast topic


Creating a Windows NT/98 PCIS-DASK Application Using Microsoft Visual Basic

To ceate a data acquisition application using PCIS-DASK and Visual Basic, follow these steps after entering Visual Basic:

step 1. Open the project in which you want to use PCIS-DASK. This can be a new or existing project

Open a new project by selecting the New Project command from the File menu. If it is an existing project, open it by selecting the Open Project command from the File menu. Then the Open Project dialog box appears.



Changed directory to the place the project file located. Double-click the project file name in the File Name list to load the project.
step 2. Add file DASK.BAS into the project if this file is not included in the project. This file contains all the procedure declarations and constants that you can use to develop your data acquisition application.
From the File menu, select the Add File command. The Add File window appears, displaying a list of files in the current directory.

Select DASK.BAS from the Files list by double-clicking on it. If you can't find this file in the list, make sure the list is displaying files from the correct directory. By default, DASK.BAS is installed in C:\\PCI-DASK\\INCLUDE.

step 3. Design the interface for the application.

To design the interface, you place the desired elements, such as command button, list box, text box, etc., on the Visual Basic form. These are standard controls from the Visual Basic Toolbox. To place a control on a form, you just move pointer to Toolbox, select the desired control and draw it on the form. Or you can double-click the control icon in the Toolbox to place it on the form.

step 4. Set properties for the controls.

To view the property list, click the desired control and then choose the Properties command from the View menu or press F4, or you can also click the Properties button on the toolbar.

step 5. Write the event code.

The event code defines the action you want to perform when an event occurs. To write the event code, double-click the desired control or form to view the code module and then add code you want. You can call the functions that declared in the file DASK.BAS to perform data acquisition operations.

step 6. Run your application.

To run the application, choose Start from the Run menu, or click the Start icon on the toolbar (you can also press F5).

step 7. Distribute your application.

Once you have finished a project, you can save the application as an executable (.EXE) file by using the Make EXE File command on the File menu. And once you have saved your application as an executable file, you've ready to distribute it. When you distribute your application, remember also to include the PCIS-DASKs DLL and driver files. These files should be copied to their appropriate directory as section 1.4.1 described.


HTML  export copyright (C) 1998 Windows Help Designer