Active x control
-
Upload
amandeep-kaur -
Category
Education
-
view
3.101 -
download
4
Transcript of Active x control
![Page 1: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/1.jpg)
![Page 2: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/2.jpg)
What is Active x control
Application
- Clock
- Calculator
How we create Active x control
How we can run Active x control
![Page 3: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/3.jpg)
ActiveX is a framework for defining reusable software components in a programming language independent way.
![Page 4: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/4.jpg)
Calculator For Addition
System Clock
![Page 5: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/5.jpg)
First we start the VB then this dialog box will appears then click on active x control.
![Page 6: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/6.jpg)
![Page 7: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/7.jpg)
Now we create a simple calculator for addition. Give the name to project is calculatorcontrol from property window.
![Page 8: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/8.jpg)
Click on the command button(=) . Then coding window will open now we write the code is:
![Page 9: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/9.jpg)
Now click on project menu and add a form
![Page 10: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/10.jpg)
Now component is alive in toolbox click on that component and drag on the screen.
![Page 11: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/11.jpg)
Now we set the property for execution
![Page 12: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/12.jpg)
Select standard EXE from project type form1 from startup project.
![Page 13: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/13.jpg)
Now execute it .
![Page 14: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/14.jpg)
First we start the VB then this dialog box appears. click on active x control.
![Page 15: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/15.jpg)
Now draw clock on it and give name clockcontrol to project from property window
![Page 16: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/16.jpg)
Coding is write on the timer , button & usercontrol button is:
Private Sub Command1_Click() Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer() h = Hour(Time) lblhours.Caption = h m = Minute(Time) lblmin.Caption = m s = Second(Time) lblsec.Caption = s End Sub
Private Sub UserControl_Initialize() Timer1.Enabled = True
End Sub
![Page 17: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/17.jpg)
Now add form from project menu.
![Page 18: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/18.jpg)
Now clock component is alive in toolbox click on it and drag on the form.
![Page 19: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/19.jpg)
Now we set the property for execution
![Page 20: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/20.jpg)
Select standard EXE from project type form1 from startup project.
![Page 21: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/21.jpg)
Now execute it.
![Page 22: Active x control](https://reader035.fdocuments.in/reader035/viewer/2022062512/554a2dbbb4c90526578b506d/html5/thumbnails/22.jpg)