在FromClick过程中
Perform(WM_SYSCOMMAND,$F012,0);

解决方案 »

  1.   

    先定义一个全局变量 ismove:boolean=true; px,py:integer;//记录鼠标位置
                      formmaxmin:integer;//form的模式form1 show事件
      formmaxmin:=1;image mousedown事件
      ismove:=true;
      px:=x;
      py:=y;image mousemove事件
      if ismove then
      begin
        form1.left:=form1.left+(x-px);
        form1.top:=form1.top+(y-py);
      end image mouseup事件
      if ismove then
        ismove:=false;image mousedblclick 事件   //双击放大或恢复窗体
      case formmaxmin of
        1: begin
             application.maximize;
             formmaxmin:=2;
           end;
        2: begin
             application.restore;
             formmaxmin:=1;
           end;
       end;
      

  2.   

    在窗体的OnMouseDown事件中
    Perform(WM_SysCommand, $F012, 0);
      

  3.   

    在窗体的OnMouseDown事件中,只添加一句
    Perform(WM_SysCommand, $F012, 0);好象不行啊!?
    其他地方还需要做什么吗?能解释详细一些吗?
    谢谢!
      

  4.   

    在窗体的MouseDown事件中加入以下语句 就可以了:
     ReleaseCapture;
     Perform(WM_SysCommand, $F012, 0);
      

  5.   

    在OnMouseDown事件中:
      if Button = mbLeft then
      begin
        SetCaptureControl(Nil);//这句很重要!
        Perform(WM_NCLBUTTONDOWN,HTCAPTION,0);
        //或Perform(WM_SysCommand, $F012, 0);
        //或SendMessage(Handle,WM_NCLBUTTONDOWN,HTCAPTION,0);
        //或SendMessage(Handle,WM_SysCommand, $F012, 0);
      end;