Active x control

6,190 views

Published on

Published in: Education
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
6,190
On SlideShare
0
From Embeds
0
Number of Embeds
139
Actions
Shares
0
Downloads
356
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Active x control

  1. 1.  What is Active x control Application - Clock - Calculator How we create Active x control How we can run Active x control
  2. 2.  ActiveXis a framework for defining reusable software components in a programming language independent way.
  3. 3.  Calculator For Addition System Clock
  4. 4.  First we start the VB then this dialog box will appears then click on active x control.
  5. 5.  Now we create a simple calculator for addition. Give the name to project is calculatorcontrol from property window.
  6. 6.  Click on the command button(=) . Then coding window will open now we write the code is:
  7. 7.  Now click on project menu and add a form
  8. 8.  Now component is alive in toolbox click on that component and drag on the screen.
  9. 9.  Now we set the property for execution
  10. 10.  Select standard EXE from project type form1 from startup project.
  11. 11.  Now execute it .
  12. 12.  First we start the VB then this dialog box appears. click on active x control.
  13. 13.  Now draw clock on it and give name clockcontrol to project from property window
  14. 14.  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
  15. 15.  Now add form from project menu.
  16. 16.  Now clock component is alive in toolbox click on it and drag on the form.
  17. 17.  Now we set the property for execution
  18. 18.  Select standard EXE from project type form1 from startup project.
  19. 19.  Now execute it.

×