コード例 #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
ファイル: ClipboardViewer.cs プロジェクト: HarukaAik/MyPad
 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);
 }