码迷,mamicode.com
首页 > 其他好文 > 详细

sendMessage

时间:2014-07-13 09:47:54      阅读:196      评论:0      收藏:0      [点我收藏+]

标签:blog   div   re   ar   c   har   

[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;
	}

  

sendMessage,布布扣,bubuko.com

sendMessage

标签:blog   div   re   ar   c   har   

原文地址:http://www.cnblogs.com/cause/p/3837914.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!