protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); if (_upDownButtonNativeWindow == null) { _upDownButtonNativeWindow = new UpDownButtonNativeWindow(this); } }
protected override void OnSizeChanged(EventArgs e) { base.OnSizeChanged(e); if (UpDownButtonHandle != IntPtr.Zero && _upDownButtonNativeWindow == null) { _upDownButtonNativeWindow = new UpDownButtonNativeWindow(this); } }
protected override void OnCreateControl() { base.OnCreateControl(); if (UpDownButtonHandle != IntPtr.Zero && _upDownButtonNativeWindow == null) { _upDownButtonNativeWindow = new UpDownButtonNativeWindow(this); } }
protected override void OnHandleDestroyed(EventArgs e) { base.OnHandleDestroyed(e); if (_upDownButtonNativeWindow != null) { _upDownButtonNativeWindow.Dispose(); _upDownButtonNativeWindow = null; } }
protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); if (UpDownButtonHandle != IntPtr.Zero) { if (_UpDownButtonNativeWindow == null) { _UpDownButtonNativeWindow = new UpDownButtonNativeWindow(this); } } }
protected override void OnControlAdded(ControlEventArgs e) { base.OnControlAdded(e); if (UpDownButtonHandle != IntPtr.Zero) { if (_upDownButtonNativeWindow == null) { _upDownButtonNativeWindow = new UpDownButtonNativeWindow(this); } } }
/// <summary> /// 检查是否存在左右按钮,有则以句柄创建一个upDownButtonNativeWindow。如果没有则将分配的的内存释放。 /// </summary> private void checkUpDownButton() { if (UpDownButtonHandle != IntPtr.Zero) { if (_upDownButtonNativeWindow == null) { _upDownButtonNativeWindow = new UpDownButtonNativeWindow(this); } } else { if (_upDownButtonNativeWindow != null) { _upDownButtonNativeWindow.Dispose(); _upDownButtonNativeWindow = null; } } }
protected override void OnHandleDestroyed(EventArgs e) { base.OnHandleDestroyed(e); if (this._upDownButtonNativeWindow != null) { this._upDownButtonNativeWindow.Dispose(); this._upDownButtonNativeWindow = null; } }
protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); if (this._upDownButtonNativeWindow == null) { this._upDownButtonNativeWindow = new UpDownButtonNativeWindow(this); } }
protected override void OnSizeChanged(EventArgs e) { base.OnSizeChanged(e); if (UpDownButtonHandle != IntPtr.Zero) { if (_upDownButtonNativeWindow == null) { _upDownButtonNativeWindow = new UpDownButtonNativeWindow(this); } } else { this.Refresh(); } }
protected override void OnControlAdded(ControlEventArgs e) { base.OnControlAdded(e); if (UpDownButtonHandle != IntPtr.Zero) { if (_upDownButtonNativeWindow == null) { _upDownButtonNativeWindow = new UpDownButtonNativeWindow(this); } } }
protected override void OnCreateControl() { base.OnCreateControl(); if (UpDownButtonHandle != IntPtr.Zero) { if (_upDownButtonNativeWindow == null) { _upDownButtonNativeWindow = new UpDownButtonNativeWindow(this); } } }