WinForm:如何专门停靠在屏幕的一侧 [英] WinForm : How to exclusively dock on a side of a screen
问题描述
经过数小时的搜索,我仍然找不到满足我需求的解决方案.
After hours searching, I still haven't found any solution to my need.
用排他性停靠的意思是它占据了屏幕的一部分(左,右,上或下),其余的其他程序则无法使用该部分.如果您使用的是Windows 8,则看起来像Win8中2分区功能的一小部分.
By saying Exclusively docking I mean that it takes a part of screen (Left, Right, Top or Bottom) and the rest other programs cannot use that part. If you have Windows 8, it looks like the small part of 2 divisions function in Win8.
我有WPF的解决方案,但现在我需要基于WinForm.
I have the solution for WPF, but now I need to do it basing on WinForm.
谢谢.
推荐答案
您可以在代码项目上使用这个很棒的解决方案(作者Corneliu是/曾经是MVP): http://www.codeproject.com/Articles/6045/Sticky-Windows如何制作您的顶级表单
You could use this awesome solution over at code project (the author Corneliu is/was a MVP): http://www.codeproject.com/Articles/6045/Sticky-Windows-How-to-make-your-top-level-forms-to
Otherwise there is a great implementation from Hans Passant here: How to make my Windows Form app snap to screen edges?
如果您想限制其他程序使用该空格,请尝试Arik Poznanski的 c# 应用程序桌面工具栏
方法: http://www.codeproject.com/Articles/3728/C-does-Shell-Part-3
If you want to restrict other programs from using the space then try Arik Poznanski's c# Application Desktop Toolbars
method:
http://www.codeproject.com/Articles/3728/C-does-Shell-Part-3
这篇关于WinForm:如何专门停靠在屏幕的一侧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!