C#DLL消息框

时间:2011-06-28 16:12:04

标签: c# dll messagebox

是否可以让C#DLL打开一个消息框?就像在WinForm中一样:

MessageBox.Show("Message");

我认为DLL不能直接执行,但如果要将其注入要运行的进程,那么它可以显示消息框(如果可能的话)。

1 个答案:

答案 0 :(得分:8)

步骤1:单击“添加引用”。在.NET下,选择System.Windows.Forms,然后单击“确定”。

第2步:使用命名空间using System.Windows.Forms;