|
-
May 10th, 2013, 06:57 AM
#1
Thread Starter
New Member
timer
pls i need a code to display label in animation using a timer from left ' you are welcome' with vb.6
thanks
-
May 10th, 2013, 07:26 AM
#2
Re: timer
Welcome to VBForums 
Thread moved from the 'CodeBank VB6' forum (which is for you to post working code examples, not questions) to the 'VB6 and earlier' forum
-
May 10th, 2013, 07:37 AM
#3
Re: timer
Not sure what you want.....(your post is not very specific), but....see this post:
http://www.vbforums.com/showthread.p...bel-not-moving
-
May 10th, 2013, 09:34 AM
#4
Thread Starter
New Member
Re: timer
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
-
May 10th, 2013, 09:41 AM
#5
Re: timer
Did you add the two lines I posted in my last post? It will continue to display.
-
May 10th, 2013, 10:06 AM
#6
Thread Starter
New Member
Re: timer
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
-
May 10th, 2013, 12:59 PM
#7
Re: timer
Your code is not correct. This is a sample code that is: EDIT: Not MY Code...just some modified from the other post!
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
Add a label. Add a timer. Add a commandbutton. and run the project. You should be able to figure this out with this code.
Last edited by SamOscarBrown; May 10th, 2013 at 01:05 PM.
-
May 10th, 2013, 01:51 PM
#8
Banned
Re: timer
he wanted a marquee text moving left or right
-
May 10th, 2013, 08:17 PM
#9
Re: timer
@ Sam, call it a joint effort!
@ladoo I though the OP in the other thread wanted the text to move left.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
May 11th, 2013, 09:56 AM
#10
Thread Starter
New Member
Re: timer
 Originally Posted by SamOscarBrown
Your code is not correct. This is a sample code that is: EDIT: Not MY Code...just some modified from the other post!
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
Add a label. Add a timer. Add a commandbutton. and run the project. You should be able to figure this out with this code.
THANKS
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|