Results 1 to 12 of 12

Thread: VB: Multiple Process Problem

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2004
    Posts
    25

    VB: Multiple Process Problem

    Dear Friends,

    I'm developing an application where my application has to bring results from web which, generally, takes 25-30 seconds. For this period of time, I need to show a loader screen. The problem is that when the first process starts(sending request to web server & getting results from there), the application doesn't execute any other command. It simply waits for results & when results arrive they are displayed. So, the loader could not be displayed. Now, how do I solve this problem? Is multi-threading the answer to my problem & is it possible in VB 6.0? If yes, than how?

  2. #2
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    Multithreading is possible, re-link.
    Have new code that will be "published" here next week that is smaller, more compact and easier to use to achieve multithreading in VB.
    However, this still won't help you

    What do you mean by a "loader"?
    Do you want a progress bar that shows the number of records left to retrieve from the server?

    Woka

  3. #3
    Addicted Member
    Join Date
    Jun 2002
    Posts
    211
    Feel Free to shoot me down, but why dont you show a form non modally before the first instruction, then end the form after the download. Put an AVI or something in the Form.

    Simon

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Apr 2004
    Posts
    25
    Dear Woka,

    Thanx for ur reply,

    By loader I mean kind of a progress bar which really does'nt need to show the no. of records loaded or left. My loader has to be a progress bar kind of display which has to be there between request & response which could simply tell the user that some processing is going on in the background. Now, how do I insert it in between? As soon as the request button is clicked, the application stops executing any other command and waits for the results. And, this is my problem. How can I make 2 different processes execute simultaneously?

    Is multi-threading possible in VB6? And, can it solve my problem?

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Apr 2004
    Posts
    25
    Dear Simon,

    I have altready tried what u r suggesting. I have tried to execute my loader screen before the request command. But, it doesn't work.

  6. #6
    Addicted Member
    Join Date
    Jun 2002
    Posts
    211
    What Happens, Or Doesnt Happen !!

    Simon

  7. #7
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    So basically you want something to let the user know that some processing is going on...
    Damn, can't find it
    I had a "Knight Rider" style prog bar that ran in a different thread, but can't find the code Sorry.

    Woka

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Apr 2004
    Posts
    25
    When I add the loader instruction before the request instruction, nothing happens. As soon as the request instruction executes the app goes to sleep.

    Yes, basically I want something to let the user know that some processing is going on... Can u find the solution for me?

  9. #9
    Addicted Member
    Join Date
    Jun 2002
    Posts
    211
    We have Applications in VB that Launch huge jobs on an as400, using a trigger process, this also hangs waiting for the process to complete, we have not had any problem, simply showing a screen with a pretty message on it. Probably I am missing the point here though.

    Simon

  10. #10
    Fanatic Member
    Join Date
    Dec 2003
    Posts
    703
    What are you using to get the data?

    You could use winsock, then you'd get progress notification..

    or the inet api?
    an ending

  11. #11

    Thread Starter
    Junior Member
    Join Date
    Apr 2004
    Posts
    25
    My app is taking info from the user, creates an xml request, and send it to a web server which sends the response in xml format. My app than converts the response and displays it on a vb form.

  12. #12

    Thread Starter
    Junior Member
    Join Date
    Apr 2004
    Posts
    25
    My app is taking info from the user, creates an xml request, and send it to a web server which sends the response in xml format. My app than converts the response and displays it on a vb form.

    I'm using DOM objects for conversions.

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