S
Shachar
Hi All,
I need to start a new process calc for example and when ever the user click
on the button the
application should setfocus to the calc application.
I use this code but it is NOT working, what I do wrong ?
10x,
Shachar.
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
myProcess.StartInfo.FileName = "calc";
myProcess.Start();
hWnd = myProcess.Handle;
if (hWnd == (IntPtr)0)
{
myProcess.Start();
hWnd = myProcess.Handle;
}
else
{
SetFocus(hWnd);
}
I need to start a new process calc for example and when ever the user click
on the button the
application should setfocus to the calc application.
I use this code but it is NOT working, what I do wrong ?
10x,
Shachar.
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
myProcess.StartInfo.FileName = "calc";
myProcess.Start();
hWnd = myProcess.Handle;
if (hWnd == (IntPtr)0)
{
myProcess.Start();
hWnd = myProcess.Handle;
}
else
{
SetFocus(hWnd);
}