pls i need a code to display label in animation using a timer from left ' you are welcome' with vb.6
thanks
Printable View
pls i need a code to display label in animation using a timer from left ' you are welcome' with vb.6
thanks
Welcome to VBForums :wave:
Thread moved from the 'CodeBank VB6' forum (which is for you to post working code examples, not questions) to the 'VB6 and earlier' forum
Not sure what you want.....(your post is not very specific), but....see this post:
http://www.vbforums.com/showthread.p...bel-not-moving
thanks, the code helped me, that was what i was looking for, but when i run the program it will display and go off, pls i want it to be displaying with out going off.
Thanks
Did you add the two lines I posted in my last post? It will continue to display.
yes i added it u can view it ur self
Private Sub tmrTest_Timer()
If tmrTest.Interval = 100 Then
lblCaption.Move lblCaption.Left - 100
If lblCaption.Left + lblCaption.Width < 0 Then
lblCaption.Left = Me.Width
End If
End Sub
are mine suppose to add anything at the labelCaption_Click()
thanks
Your code is not correct. This is a sample code that is: EDIT: Not MY Code...just some modified from the other post!
Add a label. Add a timer. Add a commandbutton. and run the project. You should be able to figure this out with this code.Code:Option Explicit
Private Sub Command1_Click()
label1.Caption = "Hello World. Example of a Marquee."
label1.Alignment = vbRightJustify
Me.Font = label1.Font
label1.Width = Me.TextWidth(label1.Caption) + 3
Timer1.Interval = 100
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Static i As Integer
If Timer1.Interval = 100 Then
i = i + 1
label1.Move label1.Left - 100
i = 1
If label1.Left + label1.Width < 0 Then
label1.Left = Me.Width
End If
End If
End Sub
he wanted a marquee text moving left or right
@ Sam, call it a joint effort!
@ladoo I though the OP in the other thread wanted the text to move left.
THANKS:check:
PLS I AM TRYING TO RIGHT A PROGRAM FOR A HOSPITAL IN WHICH EVERY INFORMATION WILL BE STALL IN A DATABASE, EXAMPLE OF THE TABLE THE NAME OF PATIENTS, FOLDER NO, COMPANY, DIAGNOSIS, DRUGS AND THEIR AMOUNT AND SPECIALIST CONSULTATION. AM TRYING TO DESIGN THE INTERFACE BE I AM CONFUSE NOW, I HAVE DESIGNED THE TABLE ON EXCEL, PLS I NEED UR HELP I AM NEW ON VB. UR LAST CODE HELPED ME I AM GRATEFUL AT-LEAST I HAVE GOTTEN THE WELCOME PAGE OF WHAT I WANT