public Pipette() { BorderStyle = BorderStyle.FixedSingle; dragging = false; _image = (Bitmap)new ComponentResourceManager(typeof(ColorDialog)).GetObject("pipette.Image"); Image = _image; _cursor = CreateCursor((Bitmap)_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(); } if (movableShowColorForm != null) { movableShowColorForm.Dispose(); } } movableShowColorForm = null; _cursor = null; base.Dispose(disposing); }