RT

解决方案 »

  1.   

      this.FormBorderStyle   =   FormBorderStyle.None;   
      

  2.   

    将FormBorderStyle  设置成None
      

  3.   

    单击窗体,设置它的一个名为FormBorderStyle的属性为None
      

  4.   

    用创建不规则窗体的办法把标题栏截掉.
            protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
            {
                Point[] p1 ={ new Point(3, 15), new Point(766, 15), new Point(766, 209), new Point(3, 209), new Point(3, 15) };
                GraphicsPath shape = new GraphicsPath();
                shape.AddLines(p1);
                this.Region = new Region(shape);
            }这样的话假定的窗体大小是(766,209),标题栏占用宽15;
    你试一下,是可以的.
    要添加引用
    using System.Drawing.Drawing2D;
    using System.Drawing;
      

  5.   

    //api declear
    [DllImport("user32.dll", EntryPoint="SetWindowLong")]
    public static extern int SetWindowLong (
    int hwnd,
    int nIndex,
    int dwNewLong
    );[DllImport("user32.dll", EntryPoint="GetWindowLong")]
    public static extern int GetWindowLong (
    int hwnd,
    int nIndex
    );public const int GWL_STYLE = (-16);
    public const int WS_SYSMENU = 0x80000;//实现代码
    public static void AddSystemMenuToForm(IntPtr WindowHandle)
    {
        int oldStyle = GetWindowLong(WindowHandle.ToInt32(),GWL_STYLE);
        SetWindowLong(WindowHandle.ToInt32(),GWL_STYLE,oldStyle|WS_SYSMENU);
    }//调用
    AddSystemMenuToForm(this);
      

  6.   

    去掉Form的标题栏么,你就直接设置FormBorderStyle就可以了