예제 #1
0
 internal void RestoreClipboardChain()
 {
     if (Environment.OSVersion.Version.Major < 6)
     {
         User32.ChangeClipboardChain(this.Handle, hwndNextViewer);
         RegisterClipboardListener();
     }
 }
예제 #2
0
 /// <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();
 }
예제 #3
0
        public override void ReleaseHandle()
        {
            if (Environment.OSVersion.Version.Major < 6)
            {
                User32.ChangeClipboardChain(this.Handle, hwndNextViewer);
            }
            else
            {
                User32.RemoveClipboardFormatListener(this.Handle);
            }

            base.ReleaseHandle();
        }
예제 #4
0
 /// <summary>
 ///     Remove this form from the Clipboard Viewer list
 /// </summary>
 internal void UnregisterClipboardViewer()
 {
     User32.ChangeClipboardChain(Handle, _clipboardViewerNext);
 }
예제 #5
0
 /// <summary>
 /// Remove this form from the Clipboard Viewer list
 /// </summary>
 public void UnregisterClipboardViewer()
 {
     User32.ChangeClipboardChain(this.Handle, _ClipboardViewerNext);
 }
예제 #6
0
 /// <summary>
 /// Remove this form from the Clipboard Viewer list
 /// </summary>
 private void UnregisterClipboardViewer()
 {
     User32.ChangeClipboardChain(this.Handle, _clipboardViewerNext);
 }
예제 #7
0
 public void Dispose()
 {
     User32.ChangeClipboardChain(this._handle, this._nextHandle);
     this._handleSource.RemoveHook(this.WndProc);
     this._handleSource.Dispose();
 }
예제 #8
0
 /// <summary>
 /// Stops the service - will remove the handler from the chain
 /// </summary>
 public void Stop()
 {
     User32.ChangeClipboardChain(_handle, _clipboardViewerNext);
 }
예제 #9
0
 protected override void Dispose(bool disposing)
 {
     NativeWindowWithEvent.Instance.ProcessMessage -= MessageEvent;
     User32.ChangeClipboardChain(NativeWindowWithEvent.Instance.Handle, nextWindow);
     base.Dispose(disposing);
 }