Click to See Complete Forum and Search --> : Can I make the text in the Status Bar scroll ..............
Tina
January 21st, 2000, 11:09 AM
The messege being displayed on the status bar is long and I dont want the font to be too small. Is there any way to make the messege scroll across ? ? ?
Any help is appreciated.
Thanks!
Aaron Young
January 21st, 2000, 02:02 PM
Place a Timer Control on Your Form..
private Sub Form_Load()
'Use Timer to do the Scrolling..
Timer1.Interval = 100
'set the Status Panel Message..
StatusBar1.Panels(1) = "Code Guru.. Where you'll find ALL the answers.."
'Make sure the Tag is empty
StatusBar1.Panels(1).Tag = ""
End Sub
private Sub Timer1_Timer()
With StatusBar1.Panels(1)
'If the Tag is empty, it's the Beginning of the Scroll
If .Tag = "" then
'Format the Text to make the Scroll Smooth
'Insert Spaces to Start Scroll from Far Right of Panel
.Tag = Space(.Width / TextWidth(" ")) & .Text
.Text = .Tag
End If
If len(.Text) then
'While there's some Text, Show One Character Less on the Left
'Give the Illusion of Scrolling to the Left
.Text = mid$(.Text, 2)
else
'Reset the Text and Scroll Again.
.Text = .Tag
End If
End With
End Sub
Aaron Young
Analyst Programmer
ajyoung@pressenter.com
aarony@redwingsoftware.com
Tina
January 21st, 2000, 10:53 PM
wow ! Works perfect.
Thanks ! ! !
Derek
January 21st, 2000, 11:20 PM
Hi Aaron,
I tried out this example but i get an error message saying "Object Required" and it highlights this part
StatusBar1.Panels(1) = "Code Guru.. Where you'll find ALL the answers.."
Can you tell me what the problem is?
I am New to Visual Basic
Tina
January 21st, 2000, 11:24 PM
Have you placed a Status Bar object on your form ?
January 22nd, 2000, 12:18 AM
Hi Tina,
I am new to Visual Basic so can you please tell me where to get the Status Bar control. I checked in the toolbox but i don't think it's there.
Please Help cause i learn alot from you guys.
thanks,
Derek
Derek
January 22nd, 2000, 12:20 AM
Hi Tina,
I am new to Visual Basic so can you please tell me where to get the Status Bar control. I checked in the toolbox but i don't think it's there.
Please Help cause i learn alot from you guys.
thanks,
Derek
Chris Eastwood
January 22nd, 2000, 04:10 AM
In VB - right click on your 'toolbox' (or goto Project->Components menu) - then scrolldown and look for either :
- Microsoft Common Controls 5.0.... (if you have VB5)
or
- Microsoft Common Controls 6.0 ... (for VB6)
You'll then have access to the TreeView, ListView, ImageList, ProgressBar, StatusBar, Toolbar and a few others.
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.