Howdy, Stranger!

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

Categories

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!


  • Justin BibJustin Bib USAMember Posts: 0

    _____ | http://forcoder.org | free ebooks and video tutorials about || Objective-C, R, JavaScript, C, Swift, MATLAB, C#, Delphi, Go, C++, Perl, Python, Assembly, PHP, Scratch, PL/SQL, Visual Basic, Java, Ruby, Visual Basic .NET Transact-SQL, FoxPro, Fortran, Dart, D, Crystal, Hack, F#, Scheme, Lisp, Prolog, ML, COBOL, Apex, Kotlin, ABAP, Lua, Erlang, Julia, Scala, Bash, Logo, SAS, Alice, VBScript, Clojure, Awk, LabVIEW, Rust, Ada || ___

Sign In or Register to comment.