To create a Component for calculating the employee salary by using VB. Create component Object Model
STEP BY STEP ALGORITHM:
Part-1: ActiveX Control
Building a Simple ActiveX Control in VB
This set of instructions will show you how to build, test and package a trivial ActiveX control. The control is used to calculate the Employee Salary details. The steps are as follows,
1. Open VB 6.0
2. From that select Active-x control then click open.STEP BY STEP ALGORITHM:
Part-1: ActiveX Control
Building a Simple ActiveX Control in VB
This set of instructions will show you how to build, test and package a trivial ActiveX control. The control is used to calculate the Employee Salary details. The steps are as follows,
1. Open VB 6.0
3. Select add-ins from the main menu select add-in manager. A dialog window will be displayed.
4. Select active-x control interface wizard as loaded and select load as startup. Then click ok
5. Again select add-ins from the main menu. Select active-x control interface wizard. One dialog window will be displayed. In that dialog window click next button.
6. Add a property as salary and also add methods as PF, URA, MR & NET.
7. Click the next button select the data type as double for both property and methods. And finally click the finish button
8. Double click the coding part and type the coding
9. Select the project and run
10. Select file menu select make the project as .ocx save the project and the user control.
Create component Object Model in Visual Basic
Part-2:
Testing your OCX from a new VB project
1. Open VB 6.0
2. Select standard.exe and design the window as shown in the output figure.
3. Select project from the Main menu. From that select components -> select your user control (project name) and then click ok.
4. Place the user control in your designed window.
5. Select the command button and write the proper coding.
Finally run and build your application | component Object Model in Visual Basic
Steps to create data report and data environment:
1. Click components. From that select designer. Then a dialog window displayed in that window select data report & data environment then click add Data Report & Data Environment.
2. Select Add-ins select visual data manager -> select file -> new->select Microsoft access version 7.0 then give a database name then right click the properties click new table give a table name then add the fields (name, salary, city). Finally select Build the table.
3. Select Data Environment. From that right click the connections. Click the properties one dialog window displayed. From that window select Microsoft Jet 3.51 OLE DB providers. Then click next.
4. In the connection tab select your database name, then click test connection a message box will be displayed as Test Connection succeed then click ok. Again In Data Environment, right click connection1 add a command. A new command is added. Now right click the command select properties.
5. In the property window type the SQL statement as select * from your
0 Comments