Results 1 to 9 of 9

Thread: Progress Help Please

  1. #1

    Thread Starter
    Fanatic Member clarkgriswald's Avatar
    Join Date
    Feb 2000
    Location
    USA
    Posts
    799

    Exclamation Progress Help Please

    I have a small form that has a progress bar on it that when loads just updates the progress bar's value. In my main form, if I click a button to load another large form I want to disply my progress form during the load process and hide it when my large form is ready. All works well as far as the order of operations EXCEPT my progress bar's value does not move. It's as if no CPU cycles are given to the progress form while the large form is loading. How can I get these to processes to work aynchronously?

    My call is like this:
    VB Code:
    1. frmProgress.Show
    2.  
    3. DoEvents
    4.  
    5. Load LargeForm
    6. LargeForm.Show
    7.  
    8. Unload frmProgress

  2. #2

  3. #3

    Thread Starter
    Fanatic Member clarkgriswald's Avatar
    Join Date
    Feb 2000
    Location
    USA
    Posts
    799
    Interesting, that works, but I am going to have to figure out another way to do this then because I have a main MDI form that contains 5 LARGE forms. When I attempt to load the form, I call the Load MyForm (this is done as opposed to the .Show in order to do just that, load the form BUT do not show yet...otherwise you see various flickers as and graphics methods. Once the load is complete I call the show (essentially just displays the form at this point). With the DoEvents in the load event, flickering is back PLUS my non modal progress form is sent to the back. ANy other suggestions?

  4. #4
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    I'm glad you pointed out what happens when you just do Show as opposed to Load followed by Show. You made me see that the Load is not truly redundant.

    Is your progress form a MDIChild? What happens if you make it an independant form (or vice versa).

  5. #5

    Thread Starter
    Fanatic Member clarkgriswald's Avatar
    Join Date
    Feb 2000
    Location
    USA
    Posts
    799
    No problem.

    Well it was an independent form, so I tried as an MDI child and to no avail. Another issue is by calling DoEvents in the load of these large forms, that opens the application up to possible errors as user interaction will be accepted while form is loading. I essentially need this progress bar to run out of process.

  6. #6

  7. #7
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    Originally posted by MartinLiss
    See you in Wally World!
    what a great film that was.. I watched it so many times on video that I wore it out & had to buy a new copy


    Anyway, back on topic... there's a link to Woka's Multi-Threading below. (I think you should start reading at the end, as he has probably linked to a newer version by now!).

  8. #8

    Thread Starter
    Fanatic Member clarkgriswald's Avatar
    Join Date
    Feb 2000
    Location
    USA
    Posts
    799
    I'm sorry, where's the link? Is it worth me setting my whole app to multi-threaded just for a progress bar?

  9. #9
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    It's at the bottom of my signature (or here: Multi-Threading)

    I'm not sure if it would be worth it, as it can be quite a lot of work. I doubt you'll need to make it all multi-threaded tho.

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