【发布时间】:2012-08-01 08:21:30
【问题描述】:
我有一个函数,private void sentEmail() in Form1。我想将该函数用于 InputBox 中的标签。
我使用的 InputBox 是这样的:http://www.csharp-examples.net/inputbox/
我新建一个类,添加InputBox的代码。
在 InputBox 中创建标签:
Label label2 = new Label();
label2.Text = mesaj;
label2.Cursor = Cursors.Hand;
现在我需要这样做:当 InputBox 出现时,当我点击label2 时,使用Form1 中的功能。 label2 是用于接收密码的文本,功能工作,但我需要在 InputBox 中使用该功能,但我不知道该怎么做。
我认为我需要创建一个新的 Handler,但我不知道如何。
【问题讨论】: