Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2004
    Posts
    4

    Question Unanswered: creating event for amount of time

    i know i learned this in high school vb class, but i forgot now. i want to have something happen...it's complicated but to make it easy lets say... i want to change the color of a text box from black to white for 3.77 seconds, then change it back. i'm pretty sure there's a way to do this without a timer, but i forget how. help would be much appreciated.

  2. #2
    Join Date
    May 2004
    Posts
    97
    Quote Originally Posted by thirty6
    i know i learned this in high school vb class, but i forgot now. i want to have something happen...it's complicated but to make it easy lets say... i want to change the color of a text box from black to white for 3.77 seconds, then change it back. i'm pretty sure there's a way to do this without a timer, but i forget how. help would be much appreciated.
    I haven't done that is a while, and if I remember correctly the multimedia control has the internals to do critical timing operations. The timer control is far too sloppy to use, you are correct.

  3. #3
    Join Date
    Nov 2004
    Posts
    4

    thanks

    thanks for the reply but that didn't actually tell me anything accept that what i was saying can be done. i know i've done it before, i just don't remember how. can someone explain how.

    also to verify, the amount of time is going to change basically each time i use it, it could be 1.23 seconds of it could be 9.32 i'm just making up numbers.

  4. #4
    Join Date
    May 2004
    Posts
    97
    Then search for winmm.dll and use the calls to that dll.

  5. #5
    Join Date
    Nov 2004
    Posts
    108

    Post Sample code for blinking label

    let the timer.interval = 1000 in form load or in timer properties window
    then create a timer procedere

    Code:
    Private Sub Timer1_Timer()
        If lblBuscando.Visible = True Then
            If lblBuscando.ForeColor = vbBlack Then
                lblBuscando.ForeColor = vbWhite
            Else
                lblBuscando.ForeColor = vbBlack
            End If
        End If
    End Sub
    to make the blinking stop set timer interval = 0

Posting Permissions

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