windows 如何“停靠”/附加 Winforms 表单
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1238503/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to "dock"/attach winforms forms
提问by Kumar
I'd like to attach two forms within the same app to each other like done by some of the music players such as winamp where the windows can be detached or attached together on one of the sides and after that moving one window movies the other one too !
我想将同一个应用程序中的两个表单相互附加,就像一些音乐播放器(例如 winamp)所做的那样,其中窗口可以在一侧分离或连接在一起,然后移动一个窗口电影另一个也 !
There perhaps is a better term to describe this behavior
也许有更好的术语来描述这种行为
any patterns or code samples that do this ?
任何模式或代码示例可以做到这一点?
采纳答案by Kumar
found the solution http://www.codeproject.com/KB/cs/stickywindows.aspxposting here for others
找到了解决方案 http://www.codeproject.com/KB/cs/stickywindows.aspx在这里发布给其他人
回答by Thomas Levesque
Have a look at this question
看看这个问题
This is for snapping to desktop edges, but you can probably adapt it to snap to another window...
这是用于捕捉到桌面边缘,但您可以调整它以捕捉到另一个窗口......