public void SetCustomBrush(Bitmap b) { if (customBrush != null) customBrush.Dispose(); customBrush = b; RedrawBrushLayer(PointToClient(Control.MousePosition)); Redraw(); }