private void CreatePen()
 {
     if (this.width > 1)
     {
         this.style |= WindowsPenStyle.Geometric;
     }
     if (this.wndBrush == null)
     {
         this.nativeHandle = IntSafeNativeMethods.CreatePen((int)this.style, this.width, ColorTranslator.ToWin32(this.color));
     }
     else
     {
         IntNativeMethods.LOGBRUSH lplb = new IntNativeMethods.LOGBRUSH {
             lbColor = ColorTranslator.ToWin32(this.wndBrush.Color),
             lbStyle = 0,
             lbHatch = 0
         };
         this.nativeHandle = IntSafeNativeMethods.ExtCreatePen((int)this.style, this.width, lplb, 0, null);
     }
 }
 private void CreateRegion(Rectangle rect)
 {
     this.nativeHandle = IntSafeNativeMethods.CreateRectRgn(rect.X, rect.Y, rect.X + rect.Width, rect.Y + rect.Height);
     this.ownHandle    = true;
 }
 protected override void CreateBrush()
 {
     IntPtr ptr = IntSafeNativeMethods.CreateSolidBrush(ColorTranslator.ToWin32(base.Color));
     bool flag1 = ptr == IntPtr.Zero;
     base.NativeHandle = ptr;
 }