窗体的BorderStyle设为None时,如何改变大小?求完整代码?

解决方案 »

  1.   

    this.Size = new Size(宽度,高度);
      

  2.   

    http://www.seezt.com/?post=108
      

  3.   


    [System.Runtime.InteropServices.DllImport("user32.dll")]
    private static int ReleaseCapture()
    {
    }
    [System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "SendMessageA")]
    private static int SendMessage(int hwnd, int wMsg, int wParam, int lParam)
    {
    }
    //响应Panel1鼠标MouseDown事件
    private void Panel1_MouseDown(System.Object sender, System.Windows.Forms.MouseEventArgs e)
    {
    ReleaseCapture();
    SendMessage(base.Handle, 0x112, 0xf008, 0);
    }