Results 1 to 2 of 2

Thread: Blink a part of your Caption

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Delhi,Delhi,India
    Posts
    4

    Post

    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

  2. #2
    Guest

    Post

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width