各自窗体有自己的操作(关闭,最大化,最小化...)

解决方案 »

  1.   

    就是由多个Form组成的啊比如有form1与form2窗体
    带代码中同时显示出来
    关了Form1不写关闭Form2的代码他们就不关连再比 Form1是播放列表 点击播放列表时 触发事件把歌曲传到Form2中就是这个道理啊
      

  2.   

    form1.show
    form2.hide在按钮事件下和运行初始状态下设置
      

  3.   

    问题是当我拖动一个窗体(form1)时,如何实现form1和form2的相对位置不变
      

  4.   

    控制location属性.form1的location属性随form2的location 改变而改变
      

  5.   

    根据ls所说实现,但是有个问题
    当鼠标拖动form1时form2响应很慢,有时甚至没有反应
    就是所form1拖动,form2还在原处啊
     
    能不能说具体点
      

  6.   

    我第一个想到的也是运用Location属性
    不过自己没有弄过
    组件调用不知道怎么弄
      

  7.   


    首先,你应当设置其它几个窗体的从属关系,然后当其中一个窗体移动时,其它几个窗体添加以下代码:
    this.Location = new Point(MousePosition.X, MousePosition.Y);
    读取主窗体的位移,这样就可以了.
      

  8.   

    这里有做好的控件,楼主可以看一下
    http://www.codeproject.com/KB/cs/stickywindows.aspx原理;
    The idea behind the implementation is to filter the NC (NonClient) messages from the Form's message queue and do the own Moving/Resizing of the form by overriding the WndProc of the NativeWindow.When a WM_NCLBUTTONDOWN is received for the Form, the StickyWindow checks the required operation (Move/Resize) and starts the algorithm for the requested operation.While mouse is moved, the algorithm computes the new Form's position/size and then tries to compute the distance to the closest Form or screen border. If the shortest distance is smaller than the StickGap, the form will be moved/resized to touch the margins of the form/screen, thus sticking taking place.While resize takes place, the form will take care not to shrink below Form.MinimumSize or SystemInformation.MinWindowTrackSize or to grow above Form.MaximumSize or SystemInformation.MaxWindowTrackSize.
      

  9.   

    LZ参考 :
    http://www.codeproject.com/KB/cs/stickywindows.aspx
    有源码的