make the form sleep without using threads

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saiarun1234
    New Member
    • Aug 2007
    • 1

    #1

    make the form sleep without using threads

    i have a typical problem....i need the main process or let us say form1 to wait for its execution until a process is completed....i have used 'Process' to run a dos command...i need the main form to wait until the process is completed....

    any ideas on how to do that.......



    thanks
    sandeep
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    I believe the Process object has a "hasExited" or something like that as a property.
    You could have a loop that watches that.

    Hide form (or disable it or whatever you want)
    Loop until the process says it's done
    Show form (or enable it or whatever you want)

    No threads used.

    Comment

    • nmsreddi
      Contributor
      • Jul 2006
      • 366

      #3
      Originally posted by Plater
      I believe the Process object has a "hasExited" or something like that as a property.
      You could have a loop that watches that.

      Hide form (or disable it or whatever you want)
      Loop until the process says it's done
      Show form (or enable it or whatever you want)

      No threads used.
      Hello

      if you want to wait ,untill other process complete ,first

      canyou estimate when the other process starts and when it ends can you estimate the time taken by other process if so

      you can halt your main process or kill the main process
      forthat particular amount of time by using a timer control
      hope it helpsyou try it out

      Comment

      Working...