I need to make a winform full screen. This is what i found online.
1. Hook WinProc to catch WM_SYSCOMMAND
2. Check wParam == SC_MAXIMIZE and then
3. Set my windiw's attributes
Me.ResizeMode = ResizeMode.NoResize
Me.WindowStyle = WindowStyle.None
Me.WindowState = WindowState.Maximized
I am fairly new to vb.net and do not know how to do Steps 1 or 2. Can someone give me a snippet or point me in the right direction?
Thanks giodamelio
The trick is to obtain the HwndSource and call its AddHook() method. This works:
The same code for a Winforms Form: