Buffer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • j7o0s5
    New Member
    • Apr 2006
    • 7

    #1

    Buffer

    I want to ask for Visual Basic 6.0
    Like this, i want to run 2 or more process in one current time, how?
    That process need long time to finished. How to make that process keep ruuning while i doing another process.
    Cause i have do it with timer is same need more time.
    Thanx u.
    Last edited by j7o0s5; Apr 27 '06, 04:28 AM.
  • CaptainD
    New Member
    • Mar 2006
    • 135

    #2
    You need to give a little more information on what the process is you are trying to perform.

    From what I can make out you might want to look into using "DoEvents" but you have to be careful that other operations that are running do not interact with each other.

    http://msdn.microsoft.com/library/de...ctdoevents.asp

    Comment

    • j7o0s5
      New Member
      • Apr 2006
      • 7

      #3
      Buffer

      Example like this :
      Private sub Form_Load()
      call Process_1
      Msgbox "Hello.."
      End Sub

      Private sub Process_1()
      for i=0 to 100000
      next
      end sub

      That example need to finish procedure "Process_1" before get message box.
      I want that at first time form load show the message box(not need time to process the procedure "Process_1" )
      Thanx u
      Last edited by j7o0s5; Apr 27 '06, 05:30 AM.

      Comment

      • CaptainD
        New Member
        • Mar 2006
        • 135

        #4
        In your example, DoEvents would not help you in that VB would wait for the process to finish before it went down to the msgbox. On the other hand, if the process was started by a timer with a DoEvents of some sort, your program would be allowed to run while the process ran in the background. DoEvents is designed to watch for Events such as button clicks etc. and to allow your program to allow other programs to work while a long process runs.

        I think I would still look into "DoEvents", there are a lot of discusions on the web with Pro's, Con's etc. and different methods of use that make for a good learning tool and might help you in getting this to work.

        Comment

        Working...