日期:2014-05-18 浏览次数:21177 次
Protected Overrides Sub OnPaintBackground(ByVal e As System.Windows.Forms.PaintEventArgs) MyBase.OnPaintBackground(e) Dim p As New Pen(Color.Red, 10) e.Graphics.DrawRectangle(p, e.ClipRectangle.X, e.ClipRectangle.Y, e.ClipRectangle.Width - 1, e.ClipRectangle.Height - 1) End Sub
this.Padding = new Padding(this.m_BorderWidth, this.m_BorderWidth + this.m_CaptionHeight, this.m_BorderWidth, this.m_BorderWidth);
------解决方案--------------------
[System.Runtime.InteropServices.DllImport("user32.dll")] public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int wndproc); [System.Runtime.InteropServices.DllImport("user32.dll")] public static extern int GetWindowLong(IntPtr hWnd, int nIndex); public const int WS_CAPTION = 0xC00000; public const int GWL_STYLE = -16; private void Form1_Load(object sender, EventArgs e) { this.FormBorderStyle = FormBorderStyle.Sizable; SetWindowLong(this.Handle, GWL_STYLE, (~WS_CAPTION) & GetWindowLong(this.Handle, GWL_STYLE)); this.Height = this.ClientSize.Height; }
------解决方案--------------------
觉得这需要细细调整,不是一两个技巧几句话就可以做成完好外观的。楼主好好再研究一下吧,我相信楼主会做出来好的效果的。