UltraClip - a Clipboard Extender Function UltraClip is a utility to extend the functionality of the Windows clipboard. It lets you * store multiple objects placed on the clipboard and view thumbnails for quick retrieval * print cheat sheets of the thumbnails * save and retrieve the objects as .CLP files to and from the disk * read .BMP, .PCX, .GIF and .WMF (Aldus) images off the disk for further use * save and restore the current UltraClip desktop and all its objects Prerequisites UltraClip requires Windows 3.1. Constraints UltraClip stores its clip objects in memory - you'll need sufficient memory to support whatever you wish to access. Large color bitmaps can comsume several megabytes, so beware. UltraClip ignores owner-display formats. Not compatible with the original release of Norton Desktop for Windows 1.0. Installation Copy UC.EXE and the help file UC.HLP to any suitable directory. Launch it from the Program Manager or your favorite menu system. UC does not have any special path or directory requirements. The UltraClip Display Window UC is an MDI application with a button and status bar along the top of the window area, and separate image windows for each clip object. From left to right the button icons represent: Cut to Clipboard - copy currently active window to clipboard , then delete image window Copy to Clipboard - copy currently active window to clipboard Paste from Clipboard - create new image window from clipboard Delete Window - remove image window from UC Clear Clipboard - delete current contents of clipboard Array - tile the image windows in a grid for easy viewing These buttons duplicate options on the UC menus. To the right of the buttons is a status display showing ... Status of Auto Paste function (P or _) Information about currently active object (if any) Size of DIB/BMP stored in memory width*height*resolution of image PICT memory size Text object size Native size if OLE data available -or- A short explanation of active icon if mouse button depressed In the open area are windows which display thumbnails of the objects currently stored in UltraClip. You can drag these windows around in the display area, iconize them, tile them or use the other options on the Window menu. If you zoom one of the clip windows, the object is displayed full size. If you resize the main window, the clip windows are retiled automatically. Using UltraClip Once UC is running, just use the paste icon or menu option to paste the current contents of the clipboard into UC. If there is a graphic on the clipboard, UC makes a copy, creates a window, and displays it. You can store as many objects as memory and resources allow. To restore an object to the clipboard, highlight the window you wish to access, and either click the Copy button, choose Edit/Copy from the menus, or right-click the window's title bar. This will copy the object to the clipboard, replacing whatever was there before. You can also choose Edit/Cut (or the Cut Button) to copy the object to the clipboard and delete the UC copy. To selectively copy one or more formats to the clipboard, right click anywhere in the window area. A dialog box with the available formats will appear. Click on the formats you're interested in, then OK to copy the selected formats to the clipboard. Remember, UltraClip retains a copy of all the fomats until you close the window, or exit the program. If you chose the wrong format the first time, just repeat the copy. Using AutoPaste - UltraClip has an Auto Paste mode that will automatically paste every new object placed on the clipboard (except those copied from UC). To activate AutoPaste choose the Edit/Start AutoPaste menu option or click the text box with the right mouse button. The status box displays P or _ depending on the current status of AutoPaste. You can configure UltraClip to start in AutoPaste mode using the File/Configure menu option. Choose the startup mode you desire and it will take effect the next time you start UltraClip. The Array Button - Clicking the array button arranges the clip windows in a grid based on your setup configuration. The default sizes the clip windows to 125 pixels square and fits as many as possible in the current window area. See the configuration section for changing the default. You can clear the current contents of the clipboard using the Edit/Clear menu or the Clear button. This may free up some memory if the clipboard is currently storing a large image. When you depress an icon button, the status display box temporarily displays a brief explanation of the action. Using .CLP Files Ultraclip can save and read .CLP files that are compatible with the Clipboard Viewer application that comes with Windows. To save a clip window as a .CLP file, highlight it by clicking on the title bar, and choose File/Save from the file menu. Supply a suitable file name, and your clip window is saved to disk. You can load one or more .clp files by choosing File/Open, selecting the CLP file type, and selecting the file/files you wish to load. Each clip object will be loaded into its own window with a thumbnail . You can copy it to the clipboard or hold for later retrival (or print a thumbnail sheet). Using .BMP, .PCX, .GIF and .WMF Files UltraClip can read Win 3.0 style bitmap files, .PCX version 5 files, .GIF single image as well as Aldus-style metafiles (the kind produced by Corel, Arts & Letters, and other draw programs). Choose File/Open, select the file type you are interested in, and highlight the filenames you wish to load. In this situation, UltraClip does a bit more than just load the format into a clip window. For .BMP files, both a memory DIB image and a bitmap & palette object are created. You can copy one or all to the clipboard as needed. PCX and GIF files are translated into a comprable DIB image, and a corresponding bitmap and palette are constructed. For metafiles, UC creates a Picture file as well as a DIB image and bitmap/palette pair. Thus you can use UC to rasterize metafiles and create bitmap objects from DIB and PCX images if needed. The Desktop The menu options Desktop/Save and Restore let you save the contents of all existing clip windows to disk and restore them later. You can specify the drive and save file name using the configure option. Please note that the desktop save file can be very large if you have a number of large objects in memory - it consumes roughly as much disk space as the in-memory images. For example, if UltraClip has reduced your free global memory from 8MB to 5MB, you can expect the desktop save file to use roughly 3 MB of disk space. Configuring UltraClip You can configure UC by choosing Configure from the file menu, or right-clicking on the title bar with the mouse. In addition to setting the startup AutoPaste mode, you can choose a new thumbnail size and printing setup and specify the desktop save file name.Your choices are written to uc.ini and takes effect with the next object pasted into UltraClip. Please note that existing thumbnails are not recalculated, so it is best to change that parameter at the beginning or end of a session. Clipboard Objects The clipboard is largely a convention that lets programs share data directly via system memory. When you "copy" to the clipboard, your application formats various blocks of global memory and turns them over to the clipboard (the Windows system) to manage. Any application can retrieve those blocks from the system, make copies, and interpret them as best as it can. An application can use both predefined formats and custom formats when creating the data for the clipboard. Since the various formats usually refer to the same general item , we can collectively call them a clipboard 'object' which has various formats. When you copy to the clipboard or empty it, you remove the existing object and replace it with another. UltraClip allows you to take a snapshot of the clipboard and preserve the current object. These snapshots are also stored in global memory, just like the original, but have a longer life. You can also save them to disk for later retrieval as .CLP files. UltraClip and OLE UltraClip is OLE aware. It does not embed or link to objects but it lets you store OLE data for embedding and linking in other applications. When you copy an OLE object into UC, it captures the OLE data; when you restore an object to the clipboard, it places copies of the original data back on the clipboard in the same order and format. The goal is to transparently restore the state of the clipboard. Of course, if you selectively choose formats to copy to the clipboard, the copy process will not match the original. The UltraClip Display Windows Each window displays a thumbnail of the object it is 'storing' - either a graphic or an unformatted dump of text. When you paste an object into UC, it stores all the available formats as well as building a thumbnail image if a graphic format is found. Notice that the text dump is not a thumbnail - I figure it's hard enough to read full size. If the object contains no displayable formats, the window displays the program name that put the data on the clipboard, and the formats that are available for copying. You may have to zoom the window to see all the text if there are many formats. The title bar of the display windows displays the origin of the image - the file name if read from disk, or the module that put the object on the clipboard (if available). If you zoom a clip window, the graphic is redrawn full size. Depending on the size and complexity of the object, this can take a while the first time. The delay is caused by the time needed to create the full image - initially, only the thumbnail is built. The full graphic is cached in memory, though, so you don't need to wait a second time. Printing Thumbnails UltraClip includes a simple print option that lets you print 'cheat sheets' of the current clip windows. In the options dialog you can specify the grid used to position the printed thumbnails: m Across by n Down with a margin of x Inches. During printing, new thumbnails are created to optimally fill the available space with a caption built from the filename or module name. Be patient when starting a print - creating a page with 24 or 30 thumbnails is quite system intensive considering the scaling and (in most cases) color conversions. Don't try a print without sufficient memory - the print manager can consure considerable disk and memory resources. The quality of the output depends somewhat on the printer driver, as does the speed of the operation. Known Peculiarities Occasionally autopaste may create multiple clip windows when only one is appropriate. Basically, this is caused by the source application prematurely closing the clipboard before it is done copying all formats. UltraClip tries very hard to avoid these duplicates, but a slow application can trip it up. This is frustrating - the only fix I know of is to turn off autopaste for that application or delete the unwanted (usually incomplete) clip windows. Publisher's Paintbrush may fail to render an image to the clipboard if it thinks memory is low - this sometimes results in a error message. Just paste into UC a second time and PubPaintbush will actually deliver up the image to the clipboard. Micrografix Designer 3.1 is unhappy with the MGX_... formats as restored by UltraClip, so they are suppressed even if present on the clipboard. It is possible to create metafiles in advanced drawing applications (such as Corel Draw) that are simply too complex for Windows to render. Typically Windows crashes when trying to display these files. One possible workaround is to copy sections of the image to the clipboard and store them in UltraClip. If, for example, Corel warns you that a given image is 'too complex' for the clipboard, do not try to display the clipboard version - rather clear the clipboard and start again. If you click a button and nothing happens, check to see that a clip window is highlighted. If not, click a title bar and try the button again. If you save an object to disk which includes a 'bitmap' format, and then restore it to an environment running in a different graphics mode, thei bitmap format will not display properly. This includes both .CLP files and desktop save files. This is unavoidable - the bitmap format is always device specific, and usually does not transfer between modes such as VGA and SuperVGA. The solution is to use the DIB format, which is device-independent and should display on any graphics adapter. Copyright UltraClip is a copyrighted work of Doug Overmyer. Registration UltraClip is distributed as shareware. If you continue to use UltraClip after a 21 day period, you are expected to register your copy. The registration fee is $5.00 (or $7.50 to also receive a current disk) payable to: Doug Overmyer 1817 San Pedro Avenue Berkeley, CA 94707 Disclaimer UltraClip carries no warranties. You use it entirely at your own risk. You must determine its suitability for your system and needs. Source Code UltraClip is written in Borland Pascal. Acknowledgements I wish to thank Nord-Jan Vermeer and Nat Johnson whose many suggestions contributed materially to UltraClip. I appreciate your help a great deal! Problems, Suggestions Please drop me a note on Compuserve (71021,2535) or Internet: overmyer@netcom.com Author Doug Overmyer December 26, 1992 Notes: Release 1.1 added OLE support, reworked entirely the storage of objects, display of metafiles, improved error recovery. Release 1.2:implemented thumbnails, reworked owner-draw format , reworked large metafile display code, added various configuration options. Release 1.3:added zooming of graphics, selective copy of formats, uniform tiling feature & better scrolling. Release 1.4:reworked the array feature, added printing, reading .BMP and .WMF files, and reading/writing .CLP files and saving/restoring the desktop,revised autopaste logic. Release 1.5:read .PCX and .GIF files;helpfile;stay on top option; Notices: Arts & Letters® is a registered trademark of Computer Support Corporation. CorelDRAW® is a registered trademark of Corel Systems Corporation. Micrografx is a registered trademark of Micrografx, Inc. GIF is a a registered trademark of CompuServe Inc.