首页 > 代码库 > sendMessage
sendMessage
[DllImport("user32.dll", EntryPoint="SendMessageA")] private static extern int SendMessage(IntPtr hwnd, uint wMsg, uint wParam, uint lParam); [DllImport("user32.dll")] private static extern int ReleaseCapture();//move ReleaseCapture(); SendMessage(pictureBox1.Handle, 0x0112, 0xF004, 0); SendMessage(pictureBox1.Handle, 0x0202, 0, 0); /* 0---------1---------2 3-------------------4 5---------6---------7 */ case 0:{ ReleaseCapture(); SendMessage(panel1.Handle, 0x0112, 0xF004, 0); SendMessage(panel1.Handle, 0x0202, 0, 0); break; } case 1:{ ReleaseCapture(); SendMessage(panel1.Handle, 0x0112, 0xF003, 0); SendMessage(panel1.Handle, 0x0202, 0, 0); break; } case 2:{ ReleaseCapture(); SendMessage(panel1.Handle, 0x0112, 0xF005, 0); SendMessage(panel1.Handle, 0x0202, 0, 0); break; } case 3:{ ReleaseCapture(); SendMessage(panel1.Handle, 0x0112, 0xF001, 0); SendMessage(panel1.Handle, 0x0202, 0, 0); break; } case 4:{ ReleaseCapture(); SendMessage(panel1.Handle, 0x0112, 0xF002, 0); SendMessage(panel1.Handle, 0x0202, 0, 0); break; } case 5:{ ReleaseCapture(); SendMessage(panel1.Handle, 0x0112, 0xF007, 0); SendMessage(panel1.Handle, 0x0202, 0, 0); break; } case 6:{ ReleaseCapture(); SendMessage(panel1.Handle, 0x0112, 0xF006, 0); SendMessage(panel1.Handle, 0x0202, 0, 0); break; } case 7:{ ReleaseCapture(); SendMessage(panel1.Handle, 0x0112, 0xF008, 0); SendMessage(panel1.Handle, 0x0202, 0, 0); break; }
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。