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. Is there any alternative for doevent

Is there any alternative for doevent

Scheduled Pinned Locked Moved Visual Basic
helpdata-structures
3 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.
  • S Offline
    S Offline
    Sushmadm
    wrote on last edited by
    #1

    Hi all, I have implemented Uploading and downloading data though serial communication. During the time of Uploading/Downloading there will be continuous exchange of data. Hence any other action on my GUI during Upload or Download operation will not be allowed (like Minimising/Maximising the form and Exitibng from the form).The GUI will hang untill the operation is complete. So to make the GUI flexible for the user i have used DoEvents in my program which will be called at some particular locations. This solved my problem. But i heard that using DoEvent may result in some problem. As the DoEvents performs all the events which are pending in the windows message queue, it may hang my application if there is an event which consumes lot of time.Please someone help me with solving this problem:(. Thanks in Advance, Sushma

    J 1 Reply Last reply
    0
    • S Sushmadm

      Hi all, I have implemented Uploading and downloading data though serial communication. During the time of Uploading/Downloading there will be continuous exchange of data. Hence any other action on my GUI during Upload or Download operation will not be allowed (like Minimising/Maximising the form and Exitibng from the form).The GUI will hang untill the operation is complete. So to make the GUI flexible for the user i have used DoEvents in my program which will be called at some particular locations. This solved my problem. But i heard that using DoEvent may result in some problem. As the DoEvents performs all the events which are pending in the windows message queue, it may hang my application if there is an event which consumes lot of time.Please someone help me with solving this problem:(. Thanks in Advance, Sushma

      J Offline
      J Offline
      J4amieC
      wrote on last edited by
      #2

      To keep the GUI responsive while executing a long-running task you should execute that task in its own thread. This can be done manually, using the Thread class, using the ThreadPool (in .NET 1.x) or the BackgroundWorker (.NET 2.x)

      S 1 Reply Last reply
      0
      • J J4amieC

        To keep the GUI responsive while executing a long-running task you should execute that task in its own thread. This can be done manually, using the Thread class, using the ThreadPool (in .NET 1.x) or the BackgroundWorker (.NET 2.x)

        S Offline
        S Offline
        Sushmadm
        wrote on last edited by
        #3

        Thank you very much for your response. I cannot go for .Net. I must implement it only in VB. Can you give me more details on how to make the GUI responsive while running a long task. Thanx and Regards, Sushma

        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