ACTIVEX CONTROL - MARQUEE

AIM:
    To create a VB application for the implementation of marquee operation using ActiveX control.

ALGORITHM:

Animate_Click()
Step 1:Check the Animate.value , if it is equal to zero then set Timer1.Enabled to True
Step 2:Else set Timer1.Enabled & Slider1.Enabled to True

Slider1_Click()
Step 1:Set Timer1.Interval to Slider1.Value

Timer1_Timer()
Step 1:Declare count as Integer
Step 2:If Label1.Left is less than or equal to zero then set Label1.Left to Label1.Width and
Increase the count value by 1
Step 3:Assign StatusBar1.Panels(1).Text to CStr(count)
Step 4:Subtract 100 from Label1.Left

UserControl_Initialize()
Step 1: Assign Animate.value to 0
Step 2: Assign Slider1.Max to 100
Step 3: Assign Slider1.Min to 1
Step 4: Assign Slider1.Value to 70
Step 5: Set Timer1.Enabled to False
Step 6: Set Timer1.Interval to Slider1.Value
Step 7: Set Timer1.Enabled to False

SOURCE CODE:
 
Private Sub Animate_Click()
If Animate.Value = 0 Then
Timer1.Enabled = False

Slider1.Enabled = False
Else
Timer1.Enabled = True
Slider1.Enabled = True
End If
End Sub

Private Sub Slider1_Click()
Timer1.Interval = Slider1.Value
End Sub

Private Sub Timer1_Timer()
Static count As Integer
If (Label1.Left) <= 0 Then
Label1.Left = Label1.Width
count = count + 1
StatusBar1.Panels(1).Text = CStr(count)
End If
Label1.Left = Label1.Left - 100
End Sub

Private Sub UserControl_Initialize()
Animate.Value = 0
Slider1.Max = 100
Slider1.Min = 1
Slider1.Value = 70
Timer1.Enabled = False
Timer1.Interval = Slider1.Value
Timer1.Enabled = False
End Sub

OUTPUT:































RESULT:
          Thus the VB application for marquee using ActiveX control was performed and the output was verified.

.

Previous
Next Post »

If you still didn't find what you're looking for, you can search this website below: