Click here to Skip to main content
15,890,995 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi

I am developing project in c#(Windows Application). 
From Mdi form,
I am calling a form 'Form1'.
'Form1' should not not steal focus,when it is opened.
The cursor should be in previously opened form. 

Please help me.

Thanks
Chandran.


What I have tried:

I tried to make a form not to steal focus in c# application
Posted
Updated 6-Oct-16 3:17am

After you call Show on the new Form, call Focus on the "old" form and it will retain the user input.
 
Share this answer
 
try, from mdi form
C#
Form2 obj = new Form2();
           obj.Show();
           this.Focus();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900