Docking a Windows Form to the edge of a screen
-
What I want to do is be able to stick a form to the top, left, right or bottom of the screen - all the way across. I found this: http://www.codeproject.com/KB/dialog/FormDocker.aspx but I don't know how I would use a VB class in a C# project, plus I don't want to have to install the VB component of VS2008 just to compile a class.
-
What I want to do is be able to stick a form to the top, left, right or bottom of the screen - all the way across. I found this: http://www.codeproject.com/KB/dialog/FormDocker.aspx but I don't know how I would use a VB class in a C# project, plus I don't want to have to install the VB component of VS2008 just to compile a class.
-
What I want to do is be able to stick a form to the top, left, right or bottom of the screen - all the way across. I found this: http://www.codeproject.com/KB/dialog/FormDocker.aspx but I don't know how I would use a VB class in a C# project, plus I don't want to have to install the VB component of VS2008 just to compile a class.
I found this: http://www.codeproject.com/KB/shell/csdoesshell3.aspx?msg=2799390#xx2799390xx but the window disapeers when I press Windows+D, how could I catch the Windows+D key sequence?
-
I found this: http://www.codeproject.com/KB/shell/csdoesshell3.aspx?msg=2799390#xx2799390xx but the window disapeers when I press Windows+D, how could I catch the Windows+D key sequence?
You don't want to catch Windows+D, that's a standard keyboard-shortcut to "Show Desktop". You wouldn't be happy if some programmer decided to hijack ctrl-alt-del, now would you? Even if you succeeded, I could always right-click the taskbar and select "Minimize All" and the effect would be the same. The good news is that Microsoft has made it hard to catch the key-sequence. The bad news is that you don't even have to catch that key.. Set your window to be the TopMost one, and restore your form in the OnMinimize-handler. HTH,