CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2008
    Posts
    38

    Display progress bar/popup screen

    I have written a code which is taking a quite longer to load, so the application hangs at that time. I want a progressbar or a popup screen showing the status need to be displayed as a model dialog until the background load completes.

    Thanks,
    Idris Gani R

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Display progress bar/popup screen

    The problem is that when you do a modal dialog it stops other code from executing. You would need to call your code that does this load from with the modal dialog. I sometimes do this with a timer on the dialog form.

    For example I may set the timer to an interval of 100 just to give the modal form time to load and draw then when the timer fires I disable the timer and call my load routine, updating the progress bar according to the progress.
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Apr 2009
    Posts
    394

    Re: Display progress bar/popup screen

    Code:
    formProgress.Show vbModeless, Me
    Will keep the form (formProgress) on top of the calling form but not interrupt the calling forms execution of code, which means you could then change the value of the progress bar on formProgress thus...
    Code:
    formProgress.ProgressBar1.Value = SomeNewValue


    Good Luck

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

Featured