Click here to Skip to main content
15,906,341 members
Home / Discussions / C#
   

C#

 
QuestionCOM GUID Pin
gioviro20-Nov-09 2:40
gioviro20-Nov-09 2:40 
QuestionNot able of saving in App.config Pin
FJJCENTU20-Nov-09 2:07
FJJCENTU20-Nov-09 2:07 
AnswerRe: Not able of saving in App.config Pin
Not Active20-Nov-09 2:26
mentorNot Active20-Nov-09 2:26 
Questionhow to connect to a remote system using ssh client Pin
himanshu110120-Nov-09 0:39
himanshu110120-Nov-09 0:39 
QuestionSolution items Pin
Priya Prk19-Nov-09 22:51
Priya Prk19-Nov-09 22:51 
AnswerRe: Solution items Pin
Calla20-Nov-09 0:17
Calla20-Nov-09 0:17 
AnswerRe: Solution items Pin
Ashfield20-Nov-09 1:20
Ashfield20-Nov-09 1:20 
QuestionCompact Framework - Problem with Process.Start Pin
dlarkin7719-Nov-09 22:02
dlarkin7719-Nov-09 22:02 
Hi,

I am having a strange problem when starting a process on a Windows Mobile based device.

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: Compact Framework - Problem with Process.Start Pin
freakyit19-Nov-09 22:43
freakyit19-Nov-09 22:43 
Questionhow are public variable define in c# Pin
pooran singh niranjan19-Nov-09 21:14
pooran singh niranjan19-Nov-09 21:14 
AnswerRe: how are public variable define in c# [modified] Pin
0x3c019-Nov-09 21:53
0x3c019-Nov-09 21:53 
GeneralRe: how are public variable define in c# Pin
David Skelly19-Nov-09 22:18
David Skelly19-Nov-09 22:18 
GeneralRe: how are public variable define in c# Pin
0x3c020-Nov-09 2:18
0x3c020-Nov-09 2:18 
AnswerRe: how are public variable define in c# Pin
Shameel19-Nov-09 22:53
professionalShameel19-Nov-09 22:53 
QuestionHow to catch event onclick when user click on a PowerPoint VBA button or click to start a video on slide (slide is showing). Pin
Dien Nguyen Manh19-Nov-09 20:00
Dien Nguyen Manh19-Nov-09 20:00 
QuestionInstall a windows component while deploying a C# application Pin
faheemnadeem19-Nov-09 19:33
faheemnadeem19-Nov-09 19:33 
AnswerRe: Install a windows component while deploying a C# application Pin
Shameel19-Nov-09 22:55
professionalShameel19-Nov-09 22:55 
GeneralRe: Install a windows component while deploying a C# application Pin
faheemnadeem19-Nov-09 23:19
faheemnadeem19-Nov-09 23:19 
GeneralRe: Install a windows component while deploying a C# application Pin
Shameel19-Nov-09 23:44
professionalShameel19-Nov-09 23:44 
GeneralRe: Install a windows component while deploying a C# application Pin
Dave Kreskowiak20-Nov-09 6:55
mveDave Kreskowiak20-Nov-09 6:55 
GeneralRe: Install a windows component while deploying a C# application Pin
faheemnadeem20-Nov-09 17:55
faheemnadeem20-Nov-09 17:55 
GeneralRe: Install a windows component while deploying a C# application Pin
Dave Kreskowiak20-Nov-09 19:04
mveDave Kreskowiak20-Nov-09 19:04 
GeneralRe: Install a windows component while deploying a C# application Pin
faheemnadeem20-Nov-09 19:14
faheemnadeem20-Nov-09 19:14 
Questioncsharp code to insert imagebuttons as two columns in gridview dynamically Pin
jyothisai1519-Nov-09 17:16
jyothisai1519-Nov-09 17:16 
AnswerRe: csharp code to insert imagebuttons as two columns in gridview dynamically Pin
jyothisai1519-Nov-09 19:28
jyothisai1519-Nov-09 19:28 

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.