日期:2014-05-20  浏览次数:20727 次

Button 点右键显示 动态信息
是这样的,动太生成好多button   这些Button   是根据读数据记录条数产生的。
每一个Button   代表一台辆,我想在Button点右键的时候可以显示,只属于这一个车的信息!那位仁兄帮帮!不知道在Button上的右键菜单如何弄!?小弟在这里谢过了

------解决方案--------------------
private void UserControl1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
//u can do something what u wanna do here.
}
}

给你的button增加右键事件。当然先得继承系统的BUTTON。