PDA

Click to See Complete Forum and Search --> : Blink a part of your Caption


Neerad Mittal
Jan 18th, 2000, 01:19 AM
Dear friends, try the code below. The question is i don't want the positon of right heading (Task List)shifted even a bit.

Question 2 - any calculation to replace the statement like - "space(52)" (52 becomes litral) to make this sub function generalized?

Question 3 - Any vb command or API available to achieve the same?

Dim toggle As Integer
Dim headleft As String
Dim headcentre As String
Dim headright As String
Dim heading As String
Dim headingblank As String
Dim lenheadright As Integer
Dim lenheadcentre As Integer
Dim lenheadleft As Integer

Private Sub Form_Load()
toggle = 1
headleft = "Entry Screen"
headcentre = "TASK SCHEDULAR MAIN WINDOW"
headright = "Task List"
dispheading headleft, headcentre, headright

Private Sub dispheading(headl As String, headc As String, _
headr As String)
lenheadleft = Len(headl)
lenheadcentre = Len(headc)
lenheadright = Len(headr)
heading = headleft + Space(52) + headcentre + Space(50) + _
headright
headingblank = headleft + Space(77) + Space(lenheadcentre) + _
Space(50) + headright
End Sub

Private Sub timerheading_Timer()
'timerheading is the name of the timer control
If toggle = 1 Then
toggle = 2
frmMain.Caption = heading
Else
toggle = 1
frmMain.Caption = headingblank
End If
End Sub

Jan 18th, 2000, 02:53 AM
apart from using 3 labels, i cant think of a way of doing it without changing the font...

if you use the Courier New font, you can put spaces where the word is (when it flashes off), this is because every character is the same width. the default font in the VB code editor is courier, so take a look.