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

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