为按钮添加弹框提示
首先定义:
public static void ShowMsg(Form form, string Msg, Control control)---那个窗体、显示的文字、在那个位置显示
{
ShowMsg(form, Msg, control, 1);
}
void btnSave_Click(object sender, EventArgs e)-----点击按钮时触发
{
ApplicationEx.ShowMsg(this, "保存成功!", this.labelX1);
}
private void ExpRegular_Load(object sender, EventArgs e) -------------页面加载事
{
this.btnSave.Click += new EventHandler(btnSave_Click);-点击按钮时触发
}