In my application, i have to display a 'Login window' before loading the main application window. It is loading correctly, but the problem is it does not get the focus.
I have tried TopMost = true, form.Focus(), form.Show(), form.Select(), form.Activate() and also some pinvoke methods such as SetActiveWindow(handle), SetForegroundWindow(handle), SetFocus(handle)(and their different combinations too..). But not solved my problem.
But, my Login window is showing in first place on Application List(displaying when we hit Alt+Tab) and the focus is getting on the application, which is in second place.
Anyone please help... Its a high priority issue...
Thanks in advance..