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. How to stop ?

How to stop ?

Scheduled Pinned Locked Moved Visual Basic
helptutorialquestion
3 Posts 3 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.
  • K Offline
    K Offline
    kk tvm
    wrote on last edited by
    #1

    Hi I have a problem in visual basic 6. I want to stop a sequence of program (Loop) using a button clik (Externally) thanx in advance by KK

    G B 2 Replies Last reply
    0
    • K kk tvm

      Hi I have a problem in visual basic 6. I want to stop a sequence of program (Loop) using a button clik (Externally) thanx in advance by KK

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      You have to call DoEvents in the loop to handle the message queue, or the program won't respond to events. --- b { font-weight: normal; }

      1 Reply Last reply
      0
      • K kk tvm

        Hi I have a problem in visual basic 6. I want to stop a sequence of program (Loop) using a button clik (Externally) thanx in advance by KK

        B Offline
        B Offline
        Briga
        wrote on last edited by
        #3

        If you state more specific questions you probably get more replies. Anyway if you mean how to interrupt a loop from outside in VB6 this a way: Declare a global variable like Alive as boolean Your loop will be:

        Alive=True
        While Alive
        (...)
        DoEvents
        End While

        In your button event: Alive=False That's it.

        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