private void RenderBorder() { IntPtr hdc = NativeMethods.GetWindowDC(this.Handle); APIRect s = new APIRect(); NativeMethods.GetWindowRect(this.Handle, ref s); using (Graphics g = Graphics.FromHdc(hdc)) { DrawingTools.DrawBorder((BorderStyle2)(int)this.BorderStyle, this.BorderColor, g, new Rectangle(0, 0, s.Width, s.Height)); } NativeMethods.ReleaseDC(this.Handle, hdc); }
private void RenderBorder() { IntPtr hdc = NativeUser32Api.GetWindowDC(this.Handle); RECTAPI s = new RECTAPI(); NativeUser32Api.GetWindowRect(this.Handle, ref s); using (Graphics g = Graphics.FromHdc(hdc)) { DrawingTools.DrawBorder((ControlBorderStyle)(int)this.BorderStyle, this.BorderColor, g, new Rectangle(0, 0, s.Width, s.Height)); } NativeUser32Api.ReleaseDC(this.Handle, hdc); }
void Draw(object sender, WidgetDrawArgs args) { if (!Parent.VisualSettings.DrawOutline) { return; } DrawingTools.DrawBorder( Parent._white_dot, args.SpriteBatch, args.DrawingArea.ToRectangle(), OutlineThickness, Parent.VisualSettings.OutlineColor, Parent.VisualSettings.OutlineSides ); }