I have C# windows form application, with all default settings. I am using VS 2008, OS - Windows VIsta.
When my form loses focus, (as in when a user clicks on something behind the form), i need the same form that lost focus to regain it.
I made use of this Event to handle this;
private void Form1_Deactivate_1(object sender, EventArgs e)
{
Console.WriteLine("DEACTIVATE EVENT _______+++++++++_________");
Form1 f = new Form1();
f.show();
}
Here, what you will see is that is when the form loses its focus, the Console.writeline command will execute and a new form will appear on the screen. I do not want this. i want the exact form that lost focus to regain focus and appear back on the screen. How do i do this.