Results 1 to 5 of 5

Thread: VERY Simple Question !!!

  1. #1

    Thread Starter
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994

    Talking VERY Simple Question !!!

    This may sound a little stupid... I have used VB for a while... But i don't know how too use Timers... I need a timer that counts down 3 seconds, write's som text in a textbox and then start the procedure over again... Please HELP
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

  2. #2
    Lively Member slx47's Avatar
    Join Date
    Apr 2002
    Location
    US
    Posts
    127
    dim a as long

    form_load()
    a = 0
    end sub

    timer1_Interval()
    a = a +1

    if a >= 8 'or anynumber
    text1.text = "What ever you want"
    a = 0
    'if you want to reset text too
    'text1.text = ""
    end if

    end sub

  3. #3
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    actually this would make more sense:

    VB Code:
    1. Private Sub Timer1_Timer()
    2. MsgBox "3 seconds passed, so do something here!"
    3. End Sub
    4.  
    5. Private Sub Form_Load()
    6. Timer1.Interval = 1000 '1000 = 1 seconds, maximum is 65535 i think
    7. End Sub
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  4. #4
    Hyperactive Member gamezfreakuk's Avatar
    Join Date
    Mar 2002
    Location
    Nottingham, UK
    Posts
    302
    Maybe


    in forms_load event

    Code:
    Timer1.Interval = 3000
    and in timer1_timer event


    Code:
    Text1.text = 'put whatver text u want here
    Gamezfreak
    Visual Basic 6 Enterprise Edition
    Borland C++ Builder 6 Enterprise Edition

  5. #5

    Thread Starter
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994

    Thanks Guys

    Thanks Guys... It REALLY helped
    Now those damn timer controls makes MUCH more sense
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

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