参考MSDN:
EventHandler<TEventArgs> 委托 (System) | Microsoft Docs
using System;
using System.Windows.Forms;
namespace TwoFormtTranslate
{
public partial class Form1 : Form
{
private readonly Form2 Fm2 = new Form2();
public Form1()
{
InitializeComponent();
}
private void Button1_Click(object sender, EventArgs e)
{
Fm2.EventTransmit += RefreshLabelText; //添加自定义事件
Fm2.Show(); //显示窗体2
}
private void RefreshLabelText(object sender, DataTransmit e)
{
label2.Text = e.My_Data.ToString();

最低0.47元/天 解锁文章
1332

被折叠的 条评论
为什么被折叠?



