发送消息,用SendMessage
[DllImport("User32.dll",EntryPoint="SendMessage")]
private static extern int SendMessage(
int hWnd, // handle to destination window
int Msg, // message
int wParam, // first message parameter
string lParam // second message parameter
);
[STAThread]
public static void Main()
{
Application.Run(new Form2());
}