public Pipette() { BorderStyle = BorderStyle.FixedSingle; _dragging = false; _image = (Bitmap) new ComponentResourceManager(typeof(ColorDialog)).GetObject("pipette.Image"); Image = _image; _cursor = CreateCursor(_image, 1, 14); _movableShowColorForm = new MovableShowColorForm(); Application.AddMessageFilter(this); }
/// <summary> /// This Dispose is called from the Dispose and the Destructor. /// </summary> /// <param name="disposing">When disposing==true all non-managed resources should be freed too!</param> protected override void Dispose(bool disposing) { if (disposing) { if (_cursor != null) { _cursor.Dispose(); } _movableShowColorForm?.Dispose(); } _movableShowColorForm = null; _cursor = null; base.Dispose(disposing); }