Click here to Skip to main content
15,846,727 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to build an application that will run in the background without form.

I am developing MOBILE TRACKER application which will send GPS information with time interval to our server.
The application will run when the windows starts and only can stop with windows mobile task manager.

I can build an application which run on the form but when I closed this form the application will stop and when I minimize this application my device will hang.

Can anybody help me?
How do I build this application, or send me reference or clue to resolved this problem.

thanks B4.
sorry for bad explaination, it's my first post in this forum :)
Updated 15-Sep-10 22:34pm
Dalek Dave 16-Sep-10 3:35am    
Edited for Grammar and Syntax.
Don't worry about this being your first question, it is laid out well and understandable.
I have seen FAR worse.

1 solution

use window service and try adding this code

Here Listener is object of socket i have used and
tsocket is
System.Threading.Thread tSocket = new Thread(new ThreadStart(StartListening)); u can use this start and stop service according to your code.

protected override void OnStart(string[] args)

//Start of thread.
tSocket.Priority = ThreadPriority.Highest;
tSocket.Name = Constants.Message.socketName;
catch (ObjectDisposedException ode)

catch (Exception ex)


Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900