Results 1 to 7 of 7

Thread: 2 procedures simultaneously

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Location
    Philippines
    Posts
    101

    2 procedures simultaneously

    is it possible for 2 procedures to process simultaneously? ex. command one contains a loop procedure and command two has another procedure of its own..what i want is that when the loop procedure in command one starts i want to be able to click command two without pausing the loop procedure...is this possible??? thanks in advance

  2. #2
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860

    I think doevents

    there's a command u can put called DoEvents I tihnk it's supposed to let u click on things while a loop is going, Ive never tested it though
    Don't pay attention to this signature, it's contradictory.

  3. #3
    Fanatic Member 007shahid's Avatar
    Join Date
    Feb 2001
    Posts
    562
    you need to create a new thread some how. maybe some api functions
    THE TIME/WEATHER IS
    Don't know how to use APIs or have problem with them,
    Download API-Guide & API-Viewer from http://www.allapi.net

  4. #4
    Fanatic Member 007shahid's Avatar
    Join Date
    Feb 2001
    Posts
    562
    DoEvents allows you to let other events get triggered only. I created 2 command buttons. Put DoEvents in both the Command_Click functions and made each command button increment the value of two different text boxes. When Command1 was clicked textbox1 incremented. When Command2 was clicked textbox2 was incremented. But textbox1 stopped incrementing
    THE TIME/WEATHER IS
    Don't know how to use APIs or have problem with them,
    Download API-Guide & API-Viewer from http://www.allapi.net

  5. #5
    joan_fl
    Guest
    I believe what you want to do is asynchronous threading... For which VB lacks any serious support. You can get by using activex exes.. but again, a poor solution.

  6. #6
    joan_fl
    Guest
    BTW Your avatar is really nice 007shahid...

  7. #7
    Fanatic Member 007shahid's Avatar
    Join Date
    Feb 2001
    Posts
    562
    BTW Your avatar is really nice 007shahid...
    Thank You
    It is actually a modified GIF I downloaded in one site.

    I believe what you want to do is asynchronous threading... For which VB lacks any serious support. You can get by using activex exes.. but again, a poor solution.
    VB has support for asyncronisation. But VB5 is more stable than VB6. I have attached a small project showing it. But it was so unstable that, my vb6 crashed 6 times and computer twice.
    You can see the asyncronisation but, when you close the form, vb crashes.
    Attached Files Attached Files
    THE TIME/WEATHER IS
    Don't know how to use APIs or have problem with them,
    Download API-Guide & API-Viewer from http://www.allapi.net

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width