尝试创建一个类似于窗体中的窗口的选择框 [英] Trying to create a selection box similar to windows within a form

查看:105
本文介绍了尝试创建一个类似于窗体中的窗口的选择框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道它的实际术语,但我想在表单中创建一个选择框。使用鼠标左键。与此图像类似, https://www.dropbox。 com / s / 257aeqon32ca5cn /截屏%202018-02-09%2018.46.32.png?dl = 0 有没有什么方法可以使用直接绘图或directX来获得类似于windows可以做的干净动画?< br $> b $ b

编辑:我相信它可能被称为drawReversibleFrame



我尝试了什么:



我尝试使用笔和画笔使用简单的rectang.le,但是在调整大小时,alpha褪色是离开扫描线,请参阅https://prnt.sc/iboz1b

I don't know the actual terminology for it, but I am trying to create a selection box within a form. Using the left mouse button. Similar to this image https://www.dropbox.com/s/257aeqon32ca5cn/Screenshot%202018-02-09%2018.46.32.png?dl=0 Is there any way to get the clean animation similar to what windows can do maybe using direct draw or directX?

I believe it may be called a drawReversibleFrame

What I have tried:

I have tried using a simple rectang.le using pen and brush, but the alpha is faded is leaves scan line when resized see https://prnt.sc/iboz1b

推荐答案

我认为它被称为橡皮筋选择,请在此处查看答案: c# - 在Winforms应用程序中填充橡皮筋 - 堆栈溢出 [ ^ ]
I think it's called a rubber band selection, see answer here: c# - filled rubber band in Winforms Application - Stack Overflow[^]


这篇关于尝试创建一个类似于窗体中的窗口的选择框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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