求C#代码:当鼠标滑过按钮时,弹出一个窗口

来源:百度知道 编辑:UC知道 时间:2024/05/21 06:29:36

这个可以,在事件中 .用这个MouseMove这个鼠标移动事件,把鼠标移到控件就发生。!

代码如下:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_MouseMove(object sender, MouseEventArgs e)
{
MessageBox.Show("呵呵, 你碰到我了.!!!");
}
}
}

//呵呵 简单吧? ,自己去试试吧..!

winform or webform?

你是asp的还是winform的啊 asp就的用javascript编写鼠标经过事件了!winform程序我就不知道了!你到属性兰找下有就是有了没有就是没有了