我怎么收不到消息!惨啊!
protected override void WndProc(ref Message msg)
{
switch(msg.Msg)
{
case WM_NCLBUTTONDOWN: //1380
Console.WriteLine( "收到消息 " );
break;
}
base.WndProc(ref msg);
}
private void button3_Click(object sender, System.EventArgs e)
{
System.IntPtr test = new IntPtr ( 10 ) ;
System.IntPtr test1 = new IntPtr ( 10 ) ;
System.Windows.Forms.Message WinMsg = Message.Create(this.Handle,WM_NCLBUTTONDOWN,test , test);
}
那里错啦!还是方法不对?请高手请教!
------解决方案--------------------你可以用SendMessage这个API来发送个消息.