Clipboard Viewer Component


Contents


Description

This is a non-visual Delphi component.

It registers a hidden window as a "clipboard viewer" which means that the component is notified by Windows of any changes to the contents of the clipboard. On receipt of these notifications the component triggers an event. By handling the event your application can respond to changes on the clipboard.

The component can be used as the heart of a program that displays "live" information about the clipboard or simply to enable and disable other components that should only be enabled when the clipboard has valid contents.

The component provides an Enabled property to switch its event triggering on and off and a TriggerOnCreation property that causes the event to be triggered when the control is created, regardless of whether the clipboard has changed at that time.


Compatibility

The component is compatible with Delphi 1 to Delphi 7. It may generate some warnings about the use of deprecated routines when compiled under Delphi 6 and 7, but the component functions correctly.


Installation

In these instructions $(DELPHI) is to be taken to represent the path where the appropriate version of Delphi was installed. For example, if you have Delphi 2 installed on the default installation path then $(DELPHI) is equivalent to C:\Program Files\Borland\Delphi 2.0.

Installation with Delphi 1

Note that the help file provided does not integrate with the Delphi 1 IDE, but can be accessed independently of the IDE.

  1. Unzip the file PJCBView.zip into a folder, preserving the directory structure.
  2. Copy the file PJCBView.pas to the folder from where you wish to install the component into the Delphi Component Palette. This will probably be an existing folder where you keep the library components - say the default $(DELPHI)\lib folder.
  3. Copy PJCBView.dcr from the 16 sub-folder into the same place that you copied PJCBView.pas.
  4. Start Delphi. Select the Options | Install Components menu option. Click the Add button, then the Browse button and navigate to the PJCBView.pas file in the directory where you placed it. Click OK to recompile the components library.
  5. You can now delete PJCBView.pas from the place where you copied it if you wish. The component will appear on a palette called DelphiDabbler. You can move the component to a different palette if required.

Installation with Delphi 2

Note that the help file provided does not integrate with the Delphi 2 IDE, but can be accessed independently of the IDE.

  1. Unzip the file PJCBView.zip into a folder, preserving the directory structure.
  2. Copy the file PJCBView.pas to the folder from where you wish to install the component into the Delphi Component Palette. This will probably be an existing folder where you keep the library components - say the default $(DELPHI)\lib folder.
  3. Copy PJCBView.dcr from the 32 sub-folder into the same place that you copied PJCBView.pas.
  4. Start Delphi. Select the Options | Install Components menu option. Click the Add button, then the Browse button and navigate to the PJCBView.pas file in the folder where you placed it. Click OK to recompile the components library.
  5. You can now delete PJCBView.pas from the place where you copied it if you wish. The component will appear on a palette called DelphiDabbler. You can move the component to a different palette if required.

Installation with Delphi 3 & later

  1. Unzip the file PJCBView.zip into a folder, preserving the directory structure.
  2. Copy the file PJCBView.pas to the folder from where you wish to install the component into the Delphi Component Palette. This will probably be a sub-folder of the $(DELPHI)\lib folder.
  3. Copy PJCBView.dcr from the 32 sub-folder into the same place that you copied PJCBView.pas.
  4. Install the component into the palette by chosing the Component | Install Component menu option. The following instructions assume you are installing into the default "users components" package:
  5. You can now delete PJCBView.pas from the place where you copied it if you wish. The component will appear on a palette called DelphiDabbler. You can move the component to a different palette if required.
  6. The simplest way to install the help file is to use my Component Help Installer Expert. To install manually, proceed as follows:

Known Issues


Update History

Release 1.2 of 11 May 2004
CBView v1.2 of 11 May 2004

Release 1.1 of 27 Jul 2003
PJCBView v1.1 of 27 Jul 2003

Release 1.0.1 of 28 Nov 1999
CBView v1.0 of 28 Nov 1999

Release 1.0 of 01 Aug 1999
CBView v1.0 of 01 Aug 1999


License & Disclaimer

This component is copyright © P.D.Johnson, 1999-2004. It is released under the Mozilla Public License:

Version: MPL 1.1

The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/.

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The Original Code is Clipboard Viewer Component.

The Initial Developer of the Original Code is Peter Johnson (http://www.delphidabbler.com/).

Portions created by the Initial Developer are Copyright © 1997-2003 Peter Johnson. All Rights Reserved.

Contributor(s):


About the Author

I'm Peter Johnson - a hobbyist programmer living in Ceredigion in West Wales, UK, writing mainly in Delphi. My programs are available for download from my website: http://www.delphidabbler.com/.

I can be contacted via the website.