当前位置:编程学习 > C#/ASP.NET >>

同时拖动多个控件文件

代码如下:(mouseDown事件)
void MapMouseDown(object sender, MouseEventArgs e)
        {
            ReleaseCapture();
            List<MapBox> list = new List<MapBox>();
            for (int i = 0; i < mapList.Count; i++)
            {
                if (mapList[i].IsSelected())
                    list.Add(mapList[i]);
            }
            for (int i = 0; i < list.Count; i++)
            {
                SendMessage((list[i] as Control).Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
            }
... ...
... ...

为何只拖动了循环中的最后一个控件,如何同时拖动多个控件文件 --------------------编程问答-------------------- MapMouseDown  改成 move 不是 MapMouseMove --------------------编程问答--------------------
引用 1 楼 ly_longyue 的回复:
MapMouseDown  改成 move 不是 MapMouseMove


关注 --------------------编程问答--------------------
引用楼主 oran0209 的回复:
代码如下:(mouseDown事件)
void MapMouseDown(object sender, MouseEventArgs e)
  {
  ReleaseCapture();
  List<MapBox> list = new List<MapBox>();
  for (int i = 0; i < mapList.Count; i++)
  {
  if (mapLi……

顶。。。
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,