举个例子,希望有所帮助。代码 private void buttonConfirm_Click(object sender, EventArgs e)
{
MessageBox.Show(Form.ActiveForm.Name, "提示信息");
}结果
show.form
Form1.ActiveForm.Name
private void buttonConfirm_Click(object sender, EventArgs e)
{
MessageBox.Show(Form.ActiveForm.Name);
}