Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. I need a wait command

I need a wait command

Scheduled Pinned Locked Moved Visual Basic
questionhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NickOne
    wrote on last edited by
    #1

    Hello all, Is there a way in VB 6.0 to make the system wait for a bit. Like system.wait(1000) where it will wait 1000 ms or something? I suppose I could write a for loop for 1 to SomeBigNumber and every 1000 do what I want to do, but this seems like a silly way to do things. Let me know please if there is a wait command. Thanks!! Oh yeah one other quick question. When I run my VB program, the Focus doesn't automatically start on the command button, like I would like. I went to the form load area and wrote cmd_calc.SetFocus (hoping that this would set focus to my command button) It gives me an error sayign invalid procedure call or argument. How can I get the focus to start on my command button? Again thank you very much! NickOne

    R 1 Reply Last reply
    0
    • N NickOne

      Hello all, Is there a way in VB 6.0 to make the system wait for a bit. Like system.wait(1000) where it will wait 1000 ms or something? I suppose I could write a for loop for 1 to SomeBigNumber and every 1000 do what I want to do, but this seems like a silly way to do things. Let me know please if there is a wait command. Thanks!! Oh yeah one other quick question. When I run my VB program, the Focus doesn't automatically start on the command button, like I would like. I went to the form load area and wrote cmd_calc.SetFocus (hoping that this would set focus to my command button) It gives me an error sayign invalid procedure call or argument. How can I get the focus to start on my command button? Again thank you very much! NickOne

      R Offline
      R Offline
      Ray Cassick
      wrote on last edited by
      #2

      NickOne wrote: Is there a way in VB 6.0 to make the system wait for a bit. Look in the SDK for the Sleep Win32 API call Look here for an example: http://www.buygold.net/v02n11/v02n11.html[^] NickOne wrote: It gives me an error sayign invalid procedure call or argument. How can I get the focus to start on my command button? Place the setfocus call in the formActivate event. The form load event fires as the form is being built and the control might not be available at that point yet. It will also help if you have all the controls Tab orders and indexes set properly.


      Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
      George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things."


      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups