Hi Simon,
When i said "change language settings", I did mean languages settings of
my
own application and not languages settings of the OS (in my case WM6).
complete code:
public void RestartApp() {
Dispose(true);
Application.Exit();
//Restart new Process
ProcessStartInfo s = new ProcessStartInfo();
s.FileName =
Assembly.GetExecutingAssembly().GetName().CodeBase;
s.UseShellExecute = false;
Process.Start(s);
}
So far its work fine, but i dont know if is the right way to do it. is?
--
Armando Rocha
Mobile Developer
http://www.ifthensoftware.com
"Simon Hart [MVP]" <
[email protected]> escreveu na mensagem
I don't see how that will work from within the same executable.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com
:
Hi, Thanks for the help.
I solved this problem with ProcessStartInfo(). Its work perfect.
Code below:
ProcessStartInfo s = new ProcessStartInfo();
s.FileName = Assembly.GetExecutingAssembly().GetName().CodeBase;
s.UseShellExecute = false;
Process.Start(s);
Armando Rocha
http://www.ifthensoftware.com
"Christian Resma Helle" <
[email protected]> escreveu na mensagem
Wrappers for this is included in OpenNETCF's Smart Device Framework.
Its
also available in source code from the old SDF 1.4
--
Regards,
Christian Helle
http://christian-helle.blogspot.com
Without writting a separate program to do this, you could use the
CeRunAppAtTime function (part of coredll.dll):
DllImport("coredll.dll", EntryPoint="CeRunAppAtTime",
SetLastError=true)]
private static extern bool CeRunAppAtTime(string pwszAppName,
byte[]
lpTime);
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com
:
Hi, 2 questions.
1.
I m working in a mobile application and i need restart my
application
after
i change language settings. How i do that?
2.
I have a Main form and i call another form (frmLanguages), when i
change
the
language display a msgbox asking if the user want restart
application,
if
the user choose yes i want call a function in Main form to restart
application.
Armando Rocha
http://www.ifthensoftware.com