₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,153 members, 8,420,584 topics. Date: Friday, 05 June 2026 at 04:38 AM

Toggle theme

Marquee Code In Vb - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingMarquee Code In Vb (6217 Views)

1 Reply

Marquee Code In Vb by moore20(op): 8:58pm On Oct 09, 2008
hi everyone,
please can anybody help me with a code to marqee a label leftwards in vb 6
i'll really appreciate it
Re: Marquee Code In Vb by luckyCO(m): 11:37am On Oct 10, 2008
I would love you to have posted this on the forum which I called Post ur VB6.0 question here. This will enable me to answer it as soon as I enter into the thread. U can also post any other one in a fresh thread and will be appreciated if you post it there for me to answer.

Now I will give you code for Left,Right,down and Button marque

You have four timers and four labels,put then on a form ,choose whichever that serves your purpose.

Private Sub Timer1_Timer()
Call MoveRight(Label1, Me)
End Sub

' the one you asked for
Private Sub Timer2_Timer()
Call MoveLeft(Label2, Me)
End Sub

Private Sub Timer3_Timer()
Call MoveUP(Label3, Me)
End Sub


Private Sub Timer4_Timer()
Call MoveDown(Label4, Me)
End Sub

'Function calls

Public Sub MoveLeft(Obj As Control, frm As Form)
Obj.Move Obj.Left + 30
If Obj.Left > frm.Width Then
Obj.Left = -1 * (frm.ScaleWidth)
End If
End Sub

Public Sub MoveRight(Obj As Control, frm As Form)
Obj.Move Obj.Left - 30
If (Obj.Left + Obj.Width) < 0 Then
Obj.Left = frm.Width
End If
End Sub

Public Sub MoveUp(Obj As Control, frm As Form)
Obj.Move Obj.Left, Obj.Top + 30
If Obj.Top > frm.Height Then
Obj.Top = -1 * (frm.ScaleHeight)

End If
End Sub

Public Sub MoveDown(Obj As Control, frm As Form)
Obj.Move Obj.Left, Obj.Top - 30

If (Obj.Top + Obj.Height) < 0 Then
Obj.Top = frm.Height
End If
End Sub

If you have problem you can call 08036025235
Thanks
Re: Marquee Code In Vb by aremu2000: 5:50am On Oct 11, 2008
pls i want to install java 6.1 but it is not install on my pc how can i install it
1 Reply

Login Code In Vb6.0How To Deploy Application With Access Database In Vb.net 2008Post Ur Vb 6.0 Questions Here234

Download Asp.net Mvc 5 Essential Training Video TutorialCheck My App Pin Pals OutWhy Are Nigerian Programmers So Smart?