Click here to Skip to main content
15,889,992 members
Home / Discussions / Mobile
   

Mobile

 
QuestionUsing Bluetooth APIs in VS 2008?? Pin
AmbiguousName21-Nov-09 22:47
AmbiguousName21-Nov-09 22:47 
QuestionHow can I check if an instance of application is already running? Pin
JUNEYT20-Nov-09 8:01
JUNEYT20-Nov-09 8:01 
AnswerRe: How can I check if an instance of application is already running? Pin
PavanPareta25-Nov-09 19:26
PavanPareta25-Nov-09 19:26 
Questionis Windows CE 6.0 comes with pdf,doc,xls soupport Pin
yrishi20-Nov-09 1:25
yrishi20-Nov-09 1:25 
AnswerRe: is Windows CE 6.0 comes with pdf,doc,xls soupport Pin
HimanshuJoshi20-Nov-09 3:11
HimanshuJoshi20-Nov-09 3:11 
QuestionRedFiveLabs Pin
Enobong Adahada19-Nov-09 21:12
Enobong Adahada19-Nov-09 21:12 
AnswerRe: RedFiveLabs Pin
slodge12-Dec-09 3:03
slodge12-Dec-09 3:03 
QuestionC# - Problems with Process.Start Pin
dlarkin7719-Nov-09 5:29
dlarkin7719-Nov-09 5:29 
Hi,

I am having a strange problem when starting a process.

RepsApp is the entry point for the application.
AppHandler is essentially a class that is used to maintain a bunch of global variables.

public class RepsApp
{
	static void Main()
	{
		AppHandler.frmMain = new FormMain();
		AppHandler.frmMain.ControlBox = true;
		AppHandler.frmMain.MinimizeBox = false;	
		AppHandler.frmMain.FormBorderStyle = FormBorderStyle.FixedSingle;
		Application.Run(AppHandler.frmMain);	

		if (AppHandler.GetUpdates)
		{
			int processID = Process.GetCurrentProcess().Id;
			Process p = new Process();
			p.StartInfo.FileName = Path.Combine(AppHandler.GetAppPath(), "AppUpdater.exe");
			p.StartInfo.Arguments = string.Format("{0} {1}", processID, true);
			p.Start();
		}

		Application.Exit();
	} 
}

In the MainForm class I simply set AppHandler.GetUpdates to True and close the form

public class FormMain : System.Windows.Forms.Form
{
	private void menuItemGetUpdates_Click(object sender, EventArgs e)
	{
		AppHandler.GetUpdates = true;
		this.Close();
	}
}

When the MainForm closes :
if AppHandler.GetUpdates is True the main application stays in memory after it launchs the AppUpdater process.
if AppHandler.GetUpdates is False the main application closes as expected.

Is there any reason why calling Process.Start would prevent the main application from closing?

Thanks,

David
AnswerRe: C# - Problems with Process.Start Pin
Enobong Adahada19-Nov-09 20:31
Enobong Adahada19-Nov-09 20:31 
AnswerRe: C# - Problems with Process.Start Pin
Ashwini K Singh22-Nov-09 21:13
Ashwini K Singh22-Nov-09 21:13 
Questionusing xml file in phone apps Pin
Enobong Adahada18-Nov-09 21:04
Enobong Adahada18-Nov-09 21:04 
AnswerRe: using xml file in phone apps Pin
Ashwini K Singh22-Nov-09 21:19
Ashwini K Singh22-Nov-09 21:19 
GeneralRe: using xml file in phone apps Pin
Enobong Adahada22-Nov-09 22:34
Enobong Adahada22-Nov-09 22:34 
GeneralRe: using xml file in phone apps Pin
Joel Ivory Johnson24-Nov-09 1:07
professionalJoel Ivory Johnson24-Nov-09 1:07 
QuestionWriting Sound Code Pin
dseo2318-Nov-09 14:02
dseo2318-Nov-09 14:02 
QuestionImplementation Enquires Pin
cloudyiee17-Nov-09 1:34
cloudyiee17-Nov-09 1:34 
AnswerRe: Implementation Enquires Pin
Joel Ivory Johnson24-Nov-09 1:05
professionalJoel Ivory Johnson24-Nov-09 1:05 
QuestionWin CE Emulator Pin
Aditya2217-Nov-09 0:47
Aditya2217-Nov-09 0:47 
AnswerRe: Win CE Emulator Pin
Joel Ivory Johnson24-Nov-09 1:03
professionalJoel Ivory Johnson24-Nov-09 1:03 
Questionsupport Pin
darion30016-Nov-09 21:36
darion30016-Nov-09 21:36 
Questionhow to open program through C# program and give this program focus - in Windows Mobile ? Pin
E_Gold15-Nov-09 19:55
E_Gold15-Nov-09 19:55 
QuestionRegistering .Net dll on smart device Pin
Manshy73215-Nov-09 3:58
Manshy73215-Nov-09 3:58 
QuestioniPhone Development on Windows Pin
slimjimtx12-Nov-09 5:53
slimjimtx12-Nov-09 5:53 
AnswerRe: iPhone Development on Windows Pin
AlexeiXX317-Nov-09 9:38
AlexeiXX317-Nov-09 9:38 
AnswerRe: iPhone Development on Windows Pin
Joel Ivory Johnson24-Nov-09 1:02
professionalJoel Ivory Johnson24-Nov-09 1:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.