如何捕获鼠标右健

okk 2002-01-03 03:21:28
...全文
29 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
bigtree21cn 2002-01-08
  • 打赏
  • 举报
回复
public class myMouseEventClass
{
protected Label label1;
// Function signatures must match the signature of the
// MouseEventHandler class.
public void myMouseDown(object sender, MouseEventArgs ex)
{
if (ex.Button == MouseButtons.Left)
{
// Insert code to execute when a mouse down event is
// received and the left button was clicked.
}
}
// A method that will show you where you are in the control
// that is receiving the event.
public void myWhereAreWe(object sender, MouseEventArgs ex)
{
label1.Text = "We are at X: " + ex.X + " Y: " + ex.Y ;
}
}
////copy from .NET Framwork SDK
julyclyde 2002-01-03
  • 打赏
  • 举报
回复
对象的click事件

17,741

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 .NET Framework
社区管理员
  • .NET Framework社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧