第1个回答 推荐于2016-03-17
引入using System.Runtime.InteropServices;
引入api函数的格式(以引入 FindWindow为例,使用和成员函数一样使用)
[DllImport("user32.dll", EntryPoint = "FindWindow")]
public static extern int FindWindow(
string lpClassName,
string lpWindowName
);
具体api函数列表 你可以找一个win32api的chm查看
类似这样本回答被提问者和网友采纳