如何在事件中使用鼠标。 [英] How to use mouse over event.

查看:72
本文介绍了如何在事件中使用鼠标。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在c#中使用鼠标事件。

i想要将光标移动到保存按钮,然后显示错误标签消息

how to use mouse event in c#.
i want to move the cursor on save button then display the error lable message.

推荐答案

从按钮属性窗口中查找按钮事件



选择MouseHover事件 - >双击空白部分



//自动MouseHover事件方法在代码窗口中创建



例如:

Find Your Button Events from your Button Property Window

Select MouseHover Event -> Double Click the empty part

//Automatically MouseHover Event Method Created in code window

Eg:
private void button1_MouseHover(object sender, EventArgs e)
        {
            MessageBox.Show("You Hover on Button 1");
        }


这篇关于如何在事件中使用鼠标。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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