|
-
Feb 20th, 2014, 01:30 PM
#1
Thread Starter
Junior Member
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!
-
Feb 20th, 2014, 01:55 PM
#2
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.
-
Feb 20th, 2014, 01:57 PM
#3
Thread Starter
Junior Member
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.
-
Feb 20th, 2014, 02:21 PM
#4
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.
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|