Sabtu, 12 Maret 2011

Make Marque on Label1.Caption


Are you confusing to make Make Marque on Label1.Caption. Try this, This Sample Moves a Label1.caption from left to right and right to left.

1. Make Form1
2. Make Timer ( fill timer interval with 1)
3. Paste this code to your vb programs


4. Make 2 Label, Label1 and Label2
'----------------------------Start
Private Sub Timer1_Timer()
'marquee text left to right
Label1.Left = Label1.Left - 20 '1
If Label1.Left = -3400 Then Label1.Left = 3500 '2

'marquee text right to left
Label2.Left = Label2.Left + 20 '3
If Label2.Left = 4000 Then Label2.Left = -3500 '4

'/ / description:
'1. The position of Label1 (left position) will be reduced continuously
'2. Until the value of the position to be -3400, when it reaches that value, then the position of Label1 changed to 3500
'3. & 4 principle the same as 1 & 2, only its value in adding pda 3 continuously.
End Sub
'----------------------------End code

Related Post :



0 comments:

R