

- Phrase express scrub text clipboard how to#
- Phrase express scrub text clipboard update#
- Phrase express scrub text clipboard plus#
Multiple open.close sequences send multiple updates.

That’s BAD – you should always do it like this: open/clear/update/close. If you see it go up by more than 1 for each copy, then some application is double-copying, or doing the clear and updates in different steps. There is a handy counter, showing the number of events received while monitoring. While it monitors, all events are logged, even if they’re “ignored”. By default, it uses the “ignore” format, but you can de-select that option. To use as an example of a viewer, just click the Monitor Clipboard button, and it starts monitoring. You can, of course, send data from the top portion, to the clipboard, and then see the result in the bottom portion.
Phrase express scrub text clipboard how to#
The bottom half is a clipboard viewer, so that you can see how to properly deal with the ignore format.
Phrase express scrub text clipboard plus#
The demo app has two sections on the form – the top half is for sending the ignore format, plus some text, to the clipboard. And there is a compiled executable, if you just want to play. There is a complete Delphi4 project, and the main program – IgnoreDemoForm.PAS is suitable as pseudo-code for VB and C++ programmers. Finally, it’s a darn good example of a clipboard viewer, so you can base clipboard viewer designs from it. It logs clipboard messages as well, so that you can troubleshoot certain situations, such as when applications send multiple updates in a row. It also is a Viewer, which implements the “ignoring”, so that you can see the behavior. It can send text to the clipboard, both with and without the CF_CLIPBOARD_VIEWER_IGNORE format, so that you can test your apps. There is a demo application called the Clipboard Viewer / Ignore Demo, which handles both sides of this situation. SetClipboardData(CF_CLIPBOARD_VIEWER_IGNORE,0) * Copy the ignore format, plus any of your own */ Be sure to do this in the SAME open/clear/update/close operation. If, on the other hand, you need to tell other clipboard viewers to ignore YOUR data (such as if you don’t want data going into ClipMate), then you need to put the CF_CLIPBOARD_VIEWER_IGNORE data format on the clipboard, along with your regular data. * Now send the message along to the next viewer, as you always do. If (Clipboard.HasFormat(CF_CLIPBOARD_VIEWER_IGNORE)) * Without opening the clipboard, see if the ignore format is present*/
Phrase express scrub text clipboard update#
When you receive a clipboard update via the WM_DrawClipboard message, see if the Clipboard Viewer Ignore format is present on the clipboard. Since don’t all work from a common header file, we all need to call it the same thing: “Clipboard Viewer Ignore”ĬF_CLIPBOARD_VIEWER_IGNORE := RegisterClipboardFormat(‘Clipboard Viewer Ignore’) Implementationĭuring start-up, register the CF_CLIPBOARD_VIEWER_IGNORE format, so that you can use it later on during clipboard calls. But since nothing should ever look at it, you should be able to leave it null. Optinally, you can include text string up to 80 bytes, identifying originating program. SpecificationĬlipboard Format Type: Private (must be registered by your program at startup)Ĭontains: NULL Data. The data itself should contain a short string identifying your app. For example, if you normally placed CF_TEXT and CF_Bitmap on the clipboard, you’d also have CF_CLIPBOARD_VIEWER_IGNORE. If you are on the other end, and need other clipboard viewers to ignore YOUR update, then simply add a CF_CLIPBOARD_VIEWER_IGNORE data format to the clipboard, right along with the other data type(s). (In ClipMate, we have a special kind of beep, and we gray out the area where we show the current clipboard contents.) If it is appropriate to change the state of your program to indicate “update ignored”, do so. Simply pass the message down the chain as you normally would.

Do not even open the clipboard (you can check without opening it). Upon receiving the message, look for the presence of the CF_CLIPBOARD_VIEWER_IGNORE data format. When a clipboard update occurs, all clipboard viewers are notified via the WM_DrawClipboard message. This method is being provided in an attempt to make all programs work better together, even competitors. It can be used in reverse – to tell ClipMate not to capture data, as well. Since this requires cooperation between ClipMate and the other clipboard viewers, we decided to establish a standardized way of handling the interaction. Such a time is when ClipMate’s PowerPaste function is active, and ClipMate wants to tell other applications to ignore the new data arriving on the clipboard. There are times when it is necessary or desirable to inform clipboard viewers (any application that is monitoring clipboard updates) that you do NOT want it to capture the clipboard update. Copyright 1999-2003 Thornsoft Development, Inc.
