任何熟悉良好的“粘性窗口"的人都可以使用它.Winforms 库? [英] Anyone familiar with a good "sticky windows" library for Winforms?

查看:26
本文介绍了任何熟悉良好的“粘性窗口"的人都可以使用它.Winforms 库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想重新创建窗口的粘性和捕捉,就像在 Winamp 中实现的一样.

I want to recreate the stickiness and snapping of windows, like it is implemented in Winamp.

基本前提是,当您拖动一个窗口并使其靠近另一个窗口时,它会吸附并粘住.当你移动它时,两者会一起移动.

The basic premise is, when you drag a window and it comes close to another one, it will snap to it and will stick. When you move it the two will move together.

我需要它用于 MDI 应用程序.

I need it for a MDI application.

推荐答案

您可以阅读这篇文章并尝试在您的程序中采用它:

You could read this article and try to adopt it for your program:

Sticky Windows - 如何使您的(顶级)表单粘贴到另一个或到屏幕

文章中介绍的类继承自System.Windows.Forms.NativeWindow,因此无需继承即可使您的类可粘贴".

The class presented in the article inherits from System.Windows.Forms.NativeWindow, thus no inheritance is required in order to make your class "Stick-able".

这篇关于任何熟悉良好的“粘性窗口"的人都可以使用它.Winforms 库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆