Results 1 to 4 of 4

Thread: I need help getting my application to run in the background

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    24

    Question I need help getting my application to run in the background

    Hi guys,

    So I'm not exactly sure how to go about this but I am trying to get my application to run in the "background". My app uses a search button and when it is clicked it sends back results for the user. I still want that functionality to work while running in the background but I have not been able to figure it out.

    If you have any further questions or I was not clear enough in my questioning, please feel free to ask, thank you.

    Thanks for the help!


  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,371

    Re: I need help getting my application to run in the background

    The concept that you want to implement is Multi-Threading. In the .Net framework, there is a component called the BackgroundWorker which really helps simplifying Multi-Threading. Basically what it does is perform the task you're wanting to do in a separate thread.

    To use the BackgroundWorker, you setup the task you're wanting to do in the DoWork event. To start the BackgroundWorker you call it's RunWorkerAsync Method, a lot of times this is done in a Button or in the Form's Load event. Then once all the work has been completed, the RunWorkerCompleted Event gets raised.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    24

    Re: I need help getting my application to run in the background

    Awesome! that makes perfect sense. I''ll give this a try thank you very much.

  4. #4
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,371

    Re: I need help getting my application to run in the background

    No problem, if you run into any problems just post them here as multi-threading can get a little finicky.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

Tags for this Thread

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