internal void RestoreClipboardChain() { if (Environment.OSVersion.Version.Major < 6) { User32.ChangeClipboardChain(this.Handle, hwndNextViewer); RegisterClipboardListener(); } }
/// <summary> /// Deregister the window to monitor the clipboard /// </summary> /// <param name="handle">Handle for the window</param> public static void DeregisterClipboardViewer(IntPtr handle) { LOG.Debug("DeregisterClipboardViewer called"); if (nextClipboardViewer != IntPtr.Zero) { User32.ChangeClipboardChain(handle, nextClipboardViewer); nextClipboardViewer = IntPtr.Zero; } CleanupTmpFile(); }
public override void ReleaseHandle() { if (Environment.OSVersion.Version.Major < 6) { User32.ChangeClipboardChain(this.Handle, hwndNextViewer); } else { User32.RemoveClipboardFormatListener(this.Handle); } base.ReleaseHandle(); }
/// <summary> /// Remove this form from the Clipboard Viewer list /// </summary> internal void UnregisterClipboardViewer() { User32.ChangeClipboardChain(Handle, _clipboardViewerNext); }
/// <summary> /// Remove this form from the Clipboard Viewer list /// </summary> public void UnregisterClipboardViewer() { User32.ChangeClipboardChain(this.Handle, _ClipboardViewerNext); }
/// <summary> /// Remove this form from the Clipboard Viewer list /// </summary> private void UnregisterClipboardViewer() { User32.ChangeClipboardChain(this.Handle, _clipboardViewerNext); }
public void Dispose() { User32.ChangeClipboardChain(this._handle, this._nextHandle); this._handleSource.RemoveHook(this.WndProc); this._handleSource.Dispose(); }
/// <summary> /// Stops the service - will remove the handler from the chain /// </summary> public void Stop() { User32.ChangeClipboardChain(_handle, _clipboardViewerNext); }
protected override void Dispose(bool disposing) { NativeWindowWithEvent.Instance.ProcessMessage -= MessageEvent; User32.ChangeClipboardChain(NativeWindowWithEvent.Instance.Handle, nextWindow); base.Dispose(disposing); }