设置this.FormBorderStyle = FormBorderStyle.None;
然后利用贴图把图片贴上去,当拖动窗体边缘大小时,界面上抖动的很厉害,请问如何解决?谢谢!~

解决方案 »

  1.   

    protected override void WndProc(ref Message m)
    {
       switch (m.Msg)
       {
           case 0x0201:    //WM_LBUTTONDOWN
             {
               Point point1 = Cursor.Position;
               point1 = PointToClient(point1);
               if (point1.X < 3)
               {
                   SysSkinForm.SkinForm.ReleaseCapture();
                   SysSkinForm.SkinForm.SendMessage(base.Handle, 0x0112, 0xF001, 0);
                    return;
                }
                 else if (point1.X > Width - 3)
                 {
                     SysSkinForm.SkinForm.ReleaseCapture();
                     SysSkinForm.SkinForm.SendMessage(base.Handle, 0x0112, 0xF002, 0);
                     return;
                  }
                  ...  这里其它的省略了...
       }
    base.WndProc(ref m);
    }我是这样写的,
    protected override void OnPaint(PaintEventArgs e)
    {
       base.OnPaint(e);
       DrawBackGroundImage(g);  //这里是以9张图片重绘
    }
      

  2.   

    public abstract class MouseAction 
    {  public abstract void Action(int ScreenX, int ScreenY, System.Windows.Forms.Form form); 

    public class MouseDrag : MouseAction 

     private object x; 
     private int y;  public MouseDrag(int hitX, int hitY) 
     { 
       x = hitX; 
       y = hitY; 
     }  public override void Action(int ScreenX, int ScreenY, System.Windows.Forms.Form form) 
     { 
       form.Location = new Point(ScreenX - x, ScreenY - y); 
     } 

    private int cursorLeft = 5; 
    private int cursorRight = 5; 
    private int cursorTop = 5; 
    private int cursorBottom = 5; 
    private int x = 0; 
    private int y = 0; 
    private MouseAction mouse; private void Form_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) 

     if (!((mouse == null))) { 
       mouse.Action(Control.MousePosition.X, Control.MousePosition.Y, this); 
     } 
    } private void Form_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) 

     x = e.X; 
     y = e.Y; 
     if (e.Y < 40) { 
       mouse = new MouseDrag(e.X, e.Y); 
     } 
    } private void Form_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) 

     mouse = null; 
    }
      

  3.   

    SysSkinForm.SkinForm.SendMessage(base.Handle, 0x0112, 0xF002, 0);
    发送消息就直接可以改变窗体大小了,你的方法我也看过网上也有类似的,http://study.zhupao.com/infoview/Article_11306.html.鼠标拖动同样也很简单,不过却稍不同于窗口的缩放拉伸.是不是达不到那种有标题拖动大小效果呢!~