-
September 28th, 2003, 03:10 PM
#1
Form's Caption
hello,
i want to make form's caption scrolling. means text in caption start moving in its bar. just like we us MARQUEE tag in HTML to scroll the text. how is it possible ?
thanks
-
September 28th, 2003, 03:24 PM
#2
A simple way...
Add a timer to a form.
Copypaste this code.
Code:
Option Explicit
Private Const FormCaption = "Hello, Word!"
Private Sub Form_Load()
Me.Caption = FormCaption
Timer1.Interval = 250
Timer1.Enabled = True
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Static Counter As Integer
Counter = Counter + 1
If Counter > Len(FormCaption) Then
Counter = 1
End If
Me.Caption = Space(Len(FormCaption) - Counter) & Left(FormCaption, Counter)
End Sub
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
September 28th, 2003, 03:45 PM
#3
-
September 28th, 2003, 04:34 PM
#4
Nice to know you enjoied
Have a nice day,
Cesare Imperiali
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
September 29th, 2003, 07:19 AM
#5
Nice to see someone tweak the standard "Hello, world!"
Just kiddin', neat code.
If kids were left to their own devices, would they ever come up with a thing like war?......The Wheel / Todd Rundgren
Do canibals not eat clowns because they taste funny?
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
|