Focus to Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that I am hiding. When I show the form again, it isn't shown maximized. Rather, it is shown in the task bar and the user must click on the form in the task bar for it to be maximized and have focus. How do I programmatically have it appear maximized and focused when I show the form
 
Set the WindowState property to Maximized before you call the Show method.

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada


Susan said:
I have a form that I am hiding. When I show the form again, it isn't
shown maximized. Rather, it is shown in the task bar and the user must
click on the form in the task bar for it to be maximized and have focus.
How do I programmatically have it appear maximized and focused when I show
the form?
 
That didn't work, I am still getting the same results. Below is the code I tried

container.WindowState = FormWindowState.Maximized
container.Show()

Thanks
Susa
 
Back
Top