+ All Categories
Home > Education > Active x control

Active x control

Date post: 06-May-2015
Category:
Upload: amandeep-kaur
View: 3,101 times
Download: 4 times
Share this document with a friend
22
Transcript
Page 1: Active x control
Page 2: Active x control

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

ActiveX is a framework for defining reusable software components in a programming language independent way.

Page 4: Active x control

Calculator For Addition

System Clock

Page 5: Active x control

First we start the VB then this dialog box will appears then click on active x control.

Page 6: Active x control
Page 7: Active x control

Now we create a simple calculator for addition. Give the name to project is calculatorcontrol from property window.

Page 8: Active x control

Click on the command button(=) . Then coding window will open now we write the code is:

Page 9: Active x control

Now click on project menu and add a form

Page 10: Active x control

Now component is alive in toolbox click on that component and drag on the screen.

Page 11: Active x control

Now we set the property for execution

Page 12: Active x control

Select standard EXE from project type form1 from startup project.

Page 13: Active x control

Now execute it .

Page 14: Active x control

First we start the VB then this dialog box appears. click on active x control.

Page 15: Active x control

Now draw clock on it and give name clockcontrol to project from property window

Page 16: Active x control

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

Now add form from project menu.

Page 18: Active x control

Now clock component is alive in toolbox click on it and drag on the form.

Page 19: Active x control

Now we set the property for execution

Page 20: Active x control

Select standard EXE from project type form1 from startup project.

Page 21: Active x control

Now execute it.

Page 22: Active x control

Recommended