Pause Help...

Okay, I'm new to programming in VB5... I know you can use *.Bas files in other versions... But in VB5, what do I use... Cause I wanted to know how to use a "pause" or "timeout" like I do in VB 3 or 4. Like,

image1.visible = true

pause 5

image1.visible = false


like that... How would I do that in VB5? Please reply!


Thanks!

AnGeLDuT


Comments

  • : Okay, I'm new to programming in VB5... I know you can use *.Bas files in other versions... But in VB5, what do I use... Cause I wanted to know how to use a "pause" or "timeout" like I do in VB 3 or 4. Like,

    : image1.visible = true

    : pause 5

    : image1.visible = false


    : like that... How would I do that in VB5? Please reply!


    : Thanks!

    : AnGeLDuT


    What not use the Timer Control?


  • This should work, but I haven't tried it.


    Use a global integer, I'll call it pauser.


    Image1.Visible=True

    Timer1.Interval=5000

    Do Until Pauser = True

    Loop

    Image1.Visible=False


    In the Timer1_Timer sub, use:


    Pauser=True




    Timer intervals are in thousandths of a second.


    If you don't actually want the program paused, just the image displayed for "x" number of seconds, use:


    Image1.Visible=True

    Timer1.Interval=5000



    In the Timer1_Timer sub, use:



    Image1.Visible=False



    This is written in VB3 code, but should work with little change in VB5.


    Hope this helps!


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories