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!
Printable View
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!
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
[email protected]
[email protected]
wow ! Works perfect.
Thanks ! ! !
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
Have you placed a Status Bar object on your form ?
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
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
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