图片框控件 [英] picture box control
本文介绍了图片框控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在徒手的黑白绘图程序中.图片在图片框上的
我怎么知道鼠标是否超过了特定点?
in a free-hand black & white drawing program. in which drawing is on a picture box :
how can i know if the mouse came over a specific point or not ?
i''d be thankfull!
推荐答案
处理MouseEnter
和MouseLeave
事件.
编辑---------------
处理MouseEnter
事件后,请捕获鼠标,以便您可以在控件内跟踪其移动.当到达特定点时,请执行某些操作.处理MouseLeave
事件后,停止捕获鼠标.
Handle theMouseEnter
andMouseLeave
events.
EDIT ---------------
When theMouseEnter
event is handled, capture the mouse so you can track it''s movement within the control. When it gets to a specific point, do something. When theMouseLeave
event is handled, stop capturing the mouse.
这篇关于图片框控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文