J
James Alba
A quick question.
In C++ I always do the following to stop a user from loading two or more
instances of my application:
HWND hWndByTitle = FindWindow(NULL, "Hello World");
if (hWndByTitle != NULL)
{
/* MessageBox(NULL, "The Application is Already Open.", "Warning", MB_OK |
MB_ICONWARNING); */
SetForegroundWindow(hWndByTitle);
return 0;
}
....
I am now working on a C# project and I now want to convert this into C#. Is
it possible, and if yes, then how?
Thanks all!
In C++ I always do the following to stop a user from loading two or more
instances of my application:
HWND hWndByTitle = FindWindow(NULL, "Hello World");
if (hWndByTitle != NULL)
{
/* MessageBox(NULL, "The Application is Already Open.", "Warning", MB_OK |
MB_ICONWARNING); */
SetForegroundWindow(hWndByTitle);
return 0;
}
....
I am now working on a C# project and I now want to convert this into C#. Is
it possible, and if yes, then how?
Thanks all!