图片框控件 [英] picture box control

查看:48
本文介绍了图片框控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在徒手的黑白绘图程序中.图片在图片框上的

我怎么知道鼠标是否超过了特定点?

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!

推荐答案

处理MouseEnterMouseLeave事件.

编辑---------------

处理MouseEnter事件后,请捕获鼠标,以便您可以在控件内跟踪其移动.当到达特定点时,请执行某些操作.处理MouseLeave事件后,停止捕获鼠标.
Handle the MouseEnter and MouseLeave events.

EDIT ---------------

When the MouseEnter 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 the MouseLeave event is handled, stop capturing the mouse.


这篇关于图片框控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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