C# Programming
08-20-2009, 06:53 PM
Hi,
I need to know when SetForegroundWindow return false because i try to set a form to the front using this code :
form.TopMost = true;
form.BringToFront();
bool focused = SetForegroundWindow(form.Handle);
if (!focused)
SwitchToThisWindow(form.Handle, true);
form.TopMost = false;
the form is showen but without having the focus.
best regards.
Keep it simple, stupid!
I need to know when SetForegroundWindow return false because i try to set a form to the front using this code :
form.TopMost = true;
form.BringToFront();
bool focused = SetForegroundWindow(form.Handle);
if (!focused)
SwitchToThisWindow(form.Handle, true);
form.TopMost = false;
the form is showen but without having the focus.
best regards.
Keep it simple, stupid!