Results 1 to 4 of 4

Thread: [RESOLVED] [2005] backgroundworker question

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2007
    Posts
    403

    Resolved [RESOLVED] [2005] backgroundworker question

    hi all,

    just wanted to ask... when running a process in a backgroundworker, do i need to manually disable all the items in my form to stop the user from any transactions while the backgroundworker is doing something and then enable them after or is there a better way to do this?

    thanks.

    VB Version: Microsoft Visual Studio 2008 Professional Edition
    .NET Version: Microsoft .NET Framework Version 3.5
    OS: Windows XP SP3

  2. #2
    Frenzied Member MaximilianMayrhofer's Avatar
    Join Date
    Aug 2007
    Location
    IM IN YR LOOP
    Posts
    2,001

    Re: [2005] backgroundworker question

    You could disable controls individually or disable their parent containers.

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] backgroundworker question

    If you don't want the user to access the form while the background operation is running then I would suggest that you display a modal dialogue with a Marquee ProgressBar on it. Remove the Close button and don't provide any way for the user to dismiss it. You can then dismiss it when the task is complete. I'd suggest running the BackgroundWorker in that dialogue instead of in your current form.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2007
    Posts
    403

    Re: [2005] backgroundworker question

    thank all.

    VB Version: Microsoft Visual Studio 2008 Professional Edition
    .NET Version: Microsoft .NET Framework Version 3.5
    OS: Windows XP SP3

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