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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

calling methods from form_load 5
Lost focus on form Resize event 1
Change Desktop Max Window Size 4
maximized window hides task bar 2
Remove Task bar Windows 1
Form lost focus 1
maximized form 4
two forms 6

Back
Top