Window Actions

  • Thread starter Thread starter Michael Bird
  • Start date Start date
M

Michael Bird

Is there a way to restore a window from its minimized state programatically
without using PInvoke? I tried seting the window state, but it restored to
the minimum window size with zero client area.

Thanks
 
Hi Micheal,

It should work.
It is possible that you set window size in some other place?
 
Hi,

As Miha said, check that you're not doing something with the window size
somewhere in the code. Otherwise a Me.WindowState = FormWindowState.Normal
would work as expected.

Regards,

Gabriele
 
I never do anything with the resizing code, other than hiding the window if
it has been minimized so it only shows up in the taskbar. Sometimes,
setting the window state will work for a few times, but then after a few
minimizes and restores, it eventually comes up at it's minimum size with no
client. All works great if I change the code from setting the WindowState
to a PInvoke of SendMessage and sending minimize and restore messages to the
form though.

I'm guessing I am missing some code somewhere or there is a bug. Either
way, I guess SendMessage works just fine.
 
Back
Top