protected override void OnHandleDestroyed(EventArgs e) { if (this._textBoxWindow != null) { this._textBoxWindow.ReleaseHandle(); this._textBoxWindow = null; } base.OnHandleDestroyed(e); }
protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); if (base.DropDownStyle == ComboBoxStyle.DropDown) { IntPtr window = Interop.GetWindow(base.Handle, 5); if (window != IntPtr.Zero) { this._textBoxWindow = new ChildTextBoxWindow(this); this._textBoxWindow.AssignHandle(window); } } this.UpdateShowInitialText(); }