Help Me With Marque In Vb

Welcome. Please Login, Register, Or Activate! 
type your username and password to login
Date: November 23, 2009, 08:17 AM
431089 members and 298155 Topics
Latest Member: Chetu9
Nairaland [Nigerian Forum] Home Help Search Who is currently online? Login Register
Nairaland Forum  |  Technology  |  Programming  |  Help Me With Marque In Vb
Pages: (1) Go Down Send this topic Notify of replies
Author Topic: Help Me With Marque In Vb  (Read 85 views)
eedu247
Help Me With Marque In Vb
« on: October 17, 2009, 09:31 AM »

Please help me with vb code to make label to scroll on a form.
sweet_pawn
Re: Help Me With Marque In Vb
« #1 on: October 19, 2009, 07:36 AM »

Place a label,a timer and command button on the form. In the timer event procedure write this:
label1.left=label1.left - 10
if label1.left< -label1.width then
label1.left= form.width
end if
Write this in button click event:
timer1.interval=100
timer1.enabled=true
label1.left= form.width
When you run, click the button & label will scroll from right to left!
eedu247
Re: Help Me With Marque In Vb
« #2 on: October 20, 2009, 07:14 AM »

Thanks sweet pawn ,but it moves 4rm left2right i change lefts 2 rights yet it refuse 2wrk. Could u pls giv me steps2 put date and time on my form.GOD blessing
sweet_pawn
Re: Help Me With Marque In Vb
« #3 on: October 20, 2009, 11:29 AM »

Hello Edu!
Seems you want your marquee to move from right to left.
I will modify the code I posted above to suit your need.
To add date and time to your form , add another label to the form and write this code in the timer event:
label2.caption= Now
sweet_pawn
Re: Help Me With Marque In Vb
« #4 on: October 20, 2009, 11:29 AM »

Hello Edu!
Seems you want your marquee to move from right to left.
I will modify the code I posted above to suit your need.
To add date and time to your form , add another label to the form and write this code in the timer event:
label2.caption= Now
s4
Re: Help Me With Marque In Vb
« #5 on: October 22, 2009, 11:04 AM »

Add the follow code to a form, then add a timer on the form and run

'This code move your form caption from left to
'right.
Dim str As String
Dim leng As Integer
Private Sub form_load()
str = "Anil Iyengar" + Space(150)
leng = Len(str) - 1
End Sub
Private Sub Timer1_Timer()
str = Left(Right(str, 1), leng) + Left(str, leng)
'To move caption from right to left
'just change
'str = Left(Right(str, leng), leng) + Left(str, 1)

Form1.Caption = str
End Sub

 Book Give Away - Requirements Analysis And System Design: Developing Information  Netbeans Ide For C++  1z0-42 & 1z0-43 Certification Tips  Page 2
Pages: (1) Go Up Send Topic to Friend by E-mail Reply 


Sections: Autos/Cars (2) Jobs/Vacancies (2) (3) Career Talk Education General(2) Politics Romance Computers Phones Travel
Sports Fashion Health Religion Celebrities TV/Movies (2) Music/Radio (2) Books Webmasters Programming

Links: Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8 Page9 Page10

Nairaland is owned by Oluwaseun Osewa. See also: Nairalist Classified Ads
Nairaland Forum | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.