WnBrowse 3.4 ============ A Windows File Browser ====================== By == Nigel G. Thomas =============== Introduction ============ The standard method of viewing files under Windows is to use the provided accessory program Notepad. As a file viewer however, Notepad has a number of limitations. It can only be used for relatively small files (less than 53K), and can only view text files. When you view a file using an editor, you also run the risk of inadvertently modifying the file. WnBrowse removes these limitations, and in addition provides MANY more facilities to make file viewing faster and easier. Some of the highlights of WnBrowse 3.4 are : * Support for files of any size * Files may be viewed in a text or hex format * Text can be selected and copied to the clipboard * The file or a selected portion can be printed with optional user defined running headers/footers. * Font selection capability * Selectable colour schemes * Drag and Drop file support. * One-click operation via the Button-Bar * Online Help * Optional File Manager Extension. * Can list and View the contents of ZIP files. (Viewing Zip files requires a copy of PKUNZIP) ********************************************************************** * PLEASE NOTE ! * * * * WnBrowse 3.4 and above will only run under Windows 3.1 and above, * * it will NOT run under Windows 3.0. Likewise, OS/2 2.1 is required * * to run WnBrowse. * * * ********************************************************************** A 32 bit version of WnBrowse for use under the Windows NT system is under development. This 16 bit version has been tested successfully under the latest Beta version of Windows NT. Installing WnBrowse =================== WnBrowse is distributed as eight files : WNBROWSE.EXE - The WnBrowse program file WNBROWSE.HLP - The on-line help file WNBROWSE.TXT - Program documentation and registration details. WBFXTEN.DLL - WnBrowse File Manager extension WNBZIP.BAT - DOS Command file for running PKUNZIP WNBZIP.PIF - PIF file for WNBZIP.BAT BWCC.DLL - The Borland Window Control Class DLL README.NOW - Information about the latest release. (WnBrowse may also be distributed as a compressed ZIP file (WINBRW.ZIP) in which case you should use PKUNZIP to expand the file before proceeding). 1. Install the WnBrowse files The Eight files above should be copied or unzipped to a directory on your hard disk (I suggest to a new directory C:\WNBROWSE). You should then define WnBrowse in a suitable Program Manager group (refer to your Windows documentation for assistance on this procedure). 2. Install the Borland DLL. The BWCC.DLL file contains a number of routines used by WnBrowse to produce better looking dialog boxes. You may already have a copy of this file on your system, particularly if you use Borland products. If you have, you can continue to use your current copy, otherwise you must copy BWCC.DLL to one of the following directories : * The directory that contains WNBROWSE.EXE * Your Windows directory (usually C:\WINDOWS) * Your Windows system directory (usually C:\WINDOWS\SYSTEM) * Any directory contained in your DOS PATH statement. 3. Install the WnBrowse File Manager Extension. The WnBrowse package includes an optional extension to the Windows File Manager that makes browsing files even easier than drag and drop. If you wish to install this feature, you must copy the file WBFXTEN.DLL to your hard disk and update the File Manager control file WINFILE.INI in your Windows directory (usually C:\WINDOWS) to contain the following two lines. [AddOns] WnBrowse=C:\wnbrowse\wbfxten.dll Note : (1) The path name (after the '=') must specify the full path where WBFXTEN.DLL was copied in step 1. (2) If you already have a File Manager extension installed, then there will already be an [AddOns] section. In this case, simply add the second line after the existing [AddOns]. (3) If you are not confident about making this change, I suggest you save a copy of WINFILE.INI first, or better still get the local Windows expert to help. When you have updated WINFILE.INI as above, you must stop and restart the File Manager for the change to take effect. 4. Installing the ZIP File viewing support. Before you can view the contents of ZIP files with WnBrowse, you must first install the ZIP extraction utility PKUNZIP (a shareware utility available from PKWARE Ltd). If PKUNZIP is installed in a directory that is NOT in your DOS PATH statement, then you must make a change to the WNBZIP.BAT file. WNBZIP.BAT as shipped contains the following line : pkunzip %1 %2 %3 %4 %5 If PKUNZIP.EXE is NOT in your DOS path, you must change the file to contain the full path to PKUNZIP. For example if PKUNZIP.EXE is in the directory UTILS on drive C, change the contents to : C:\UTILS\PKUNZIP %1 %2 %3 %4 %5 When Viewing a zipped file, WnBrowse makes a temporary copy of that file. This copy is deleted after viewing is completed. Where WnBrowse places these temporary files depends on the presence of a DOS environment variable (TEMP). If the TEMP variable is defined, then temporary files are placed in that directory, otherwise, files are placed in the root directory of the disk containing Windows. For example to place temporary files in the directory C:\TEMP, place the following line in your AUTOEXEC.BAT file : SET TEMP=C:\TEMP Note : Ensure that the directory named in the TEMP variable exists. WARNING : To ensure that you do not inadvertently overwrite files in your root directory, it is STRONGLY recommended that you use a temporary directory. =========== Please Note =========== WnBrowse is not freeware or in the public domain, it is Shareware. You may use WnBrowse without charge for a reasonable period of time to evaluate the product. If after that time you wish to continue using WnBrowse you must register your copy using the procedure detailed at the end of this file. However, WnBrowse is 100% functional and contains no limitations or 'Nag' boxes. Commands ======== File Menu : Open... ------- Presents a File open dialog box from which the file to be browsed can be selected. Save As... ---------- Saves the current text selection to a file of your choice selected from the 'Save As' common dialog. Close File ---------- Closes the current file (if any) and iconizes (minimizes). Previous File ------------- Selects the previous file for browsing. Next File --------- Selects the next file for browsing. Print... -------- Prints the current file or a selection thereof. Printer Setup... ---------------- Used to select a printer and to set printer options. Show Information... ------------------- Displays information about the current file (size,date etc). Exit ---- Exits WnBrowse. Edit Menu : Copy ---- Copies selected text to the Windows clipboard. Select All ---------- Quickly selects the entire file. Search Menu : Find... ------- Searches for text within the file. The string to be searched for can be entered as ASCII or hex characters. Repeat last find ---------------- Searches for the next occurrence of the previous find string. Goto... ------- Allows the file to be scrolled to a specified line or offset. View Menu : Text Mode --------- Displays the current file in the text viewing mode (the default for text files). Hex Mode -------- Displays the current file in the hex viewing mode (the default for non-text files). View ZIP File Contents... ------------------------- Displays information about the files contained within a ZIP file. Redisplay Zip File ------------------ Redisplays the Zip file that contains the file being viewed. Options Menu : Select Font... -------------- Allows the font to be selected. The same font is used for both displaying and printing the file. Expand Tabs ----------- If selected (indicated by a tick mark), any tabs in the file are expanded when displaying and printing the file. Ruler ----- If selected, a ruler is displayed in the text viewing mode. Remove scroll bars ------------------ If selected the scroll bars (if needed) are removed. This gives more space for file viewing by keyboard fans ! Display status Line ------------------- If selected a status line is displayed giving useful status and help information. Display Button Bar ------------------ If selected a button bar is displayed allowing one-click access to many WnBrowse functions (see on-line help for details). Colours... ---------- Allows the WnBrowse colour scheme to be changed to match your particular taste. Set Line Length... ------------------ Sets the length of lines displayed from non-text files in the text viewing mode (1-255) Save Settings ------------- Saves all the WnBrowse options. Help Menu : Index ----- Displays the WnBrowse help index Keyboard -------- Displays help about controlling WnBrowse using the keyboard. Using Help ---------- Displays help on using Windows Help. About... -------- Displays WnBrowse version details. Procedures ========== Selecting Files --------------- There are four ways of selecting files for browsing with WnBrowse. 1. Open command By selecting "Open" from the File menu or by clicking the open button, a dialog box is presented from which a single file can be selected. WnBrowse also saves the names of all files contained in the file listbox, these can be browsed by selecting the Previous or Next file command in the File menu. 2. Drag and Drop One or more files can be dragged from the File Manager and dropped onto the WnBrowse Window or the WnBrowse ICON. To facilitate easy drag and dropping, the WnBrowse ICON can be kept on constant display by selecting 'Keep ICON on top' from the WnBrowse system menu. 3. Command Line The name of the file to be browsed can be specified on the WnBrowse command line. More than one file can be selected by using the DOS wildcards '?' and '*'. WNBROWSE.EXE C:\DOCS\*.TXT Would select all files in the DOCS directory with a file type of TXT. 4. WnBrowse File Manager Extension. If you installed the optional WnBrowse File Manager Extension, you can browse files directly from a new File Manager menu. The extension adds an extra menu (Browse) to the File Manager menu bar. To browse a file (or files), simply select the files in the usual way, and select 'Browse Selected File(s)' from the Browse menu. The Browse menu option works from both the directory window and the search results window. If a copy of WnBrowse is not running when the Browse option is selected, the WnBrowse File Manager extension attempts to start a copy. For this to work, a copy of WNBROWSE.EXE must be in a directory contained in the DOS PATH statement. If you are running Windows for Workgroups, the WnBrowse extension will add a browse button (a magnifying glass) to the toolbar. This button can be used for even faster browsing. Selecting Text -------------- The mouse is used to select text from the file being browsed. The selected text is displayed in a different colour to distinguish it from unselected text. Selected text can be copied to the Windows clipboard (for pasting into other applications), can be printed, or can be save to a file. Text is selected in the usual way by clicking the mouse at the start or end of the required text, and dragging the mouse over the required text. If the mouse is dragged outside the boundaries of the WnBrowse window, the file will be scrolled and selected. To speed up text selected, the keyboard can be used. For example, click and hold the mouse at the start of the required text, then use the Page-Down key to scroll through the file, selecting as you go. Note : In text mode, selection is done character by character, in hex view mode selection is line by line. Viewing ZIP Files ----------------- WnBrowse provides limited support for displaying and viewing the contents of ZIP files. When a ZIP file is selected, the ZIP button and the 'View ZIP File Contents' menu item can be used to display the names of included files. From the ZIP display dialog, you can select one of the included files for viewing by double clicking on the required file name, or by selecting a file and pressing the View button. WnBrowse will UNZIP the file and display it in the WnBrowse window. Selecting 'Redisplay Zip File' or pressing the Re-display ZIP button will redisplay the original ZIP file. When Windows is running in enhanced mode, files are unzipped in an iconized DOS window. In standard mode the unzipping will be performed in a fullscreen DOS session. NOTE : ZIP Viewing is not currently supported when WnBrowse is running under the OS/2 operating System. Recursive Zip viewing is not supported. That is, you cannot view a file contained within a Zip file that is itself contained within a Zip file. Printing -------- The File menu contains two commands used to control printing, the first 'Printer Setup' is used to select the required printer, and to set printer options, such as page size. The actual options available will vary according to the type of printer being used. The second print command 'Print' is used to display a dialog box from which file printing is controlled (you can also click on the printer button). The following options are available : * Print full file or only selected text * Set the size of the left, top and bottom margins * Print with or without user defined headers and footers * Print using the default printer font * Process embedded form feed characters. If the header/footer check box is clicked, the print dialog box is expanded to allow the entry of a header and footer line to be printed at the top and bottom of each page. Along with the text required in these lines, you may also include the following codes : &d - Prints the current date &t - Prints the current time &f - Prints the name of the file being printed &p - Prints the current page number Note: The exact format of the time and date is dependant on the current control panel settings. The slash character '/' can be used to left justify, right justify, or centre text within the headers and footers. for example : &f/&d/Page &p would result in : wnbrowse.txt 28/08/92 Page 1 Page Ejects ----------- When printing a text file, if the Process Form Feed option is set, and if any line contains a Form-Feed ASCII character in position one (hex '0C'), WnBrowse will start a new page before printing that line. When printing files that contain Form-Feeds, you should ensure that the page margins are set to appropriate values. Mouse control ------------- While most WnBrowse functions can be controlled by either the mouse or the keyboard, some functions are only available via the mouse. One, text selection, has already been covered, below are the rest : Popup File selection -------------------- When multiple files are available for browsing, a single right click of the mouse in the WnBrowse window will produce a popup dialog box allowing quick file selection. Mouse File positioning ---------------------- If the left mouse button is double clicked on a text line two things take place : 1. The line is scrolled to the top of the window. 2. The new file position is remembered by WnBrowse. If the right mouse button is subsequently double clicked anywhere within the WnBrowse text window, the file is repositioned at the point saved above. A second right button double click returns to the previous position. Selecting text to search for ---------------------------- You can quickly find other occurrences of a text string within a file by selecting the text you want to search for before clicking the Find button or selecting Find from the Search menu. The selected text will be used as the initial string to be searched for. Launch Button ------------- When browsing a file that has an associated program defined, you can launch that program by clicking on the Launch button. For example, if you click the Launch button while browsing a BMP file, the Windows paint brush program will be launched. The associations used by WnBrowse are defined using the Windows File Manager. Re-display ZIP File ------------------ When viewing a file contained within a ZIP file, you can re-display the archive ZIP file by clicking on the Re-display ZIP File button. The Zip file will be re-displayed and the Zip list dialog box shown. Repeat Search Button -------------------- The repeat search button is used to find the next or previous occurrence of a character string within a file. If the shift key is pressed while the repeat search button is clicked, then the search direction is temporarily reversed. Keyboard Usage -------------- Key Usage =============== ======================================= F1 Displays the Help Index F3 Performs a Find Next ESC Closes the file and iconizes ctrl-T Selects text view mode ctrl-H Selects hex view mode ctrl-M Toggles the display of the menu ctrl-S Saves the currently selected options ctrl-C Copies selected text to the clipboard ctrl-Page Up Browses the previous file ctrl-Page Down Browses the next file Page Up Scrolls up one window full Page Down Scrolls down one window full Up Arrow Scrolls up one line Down Arrow Scrolls down one line Left Arrow Scrolls left 8 characters Right Arrow Scrolls right 8 characters Home Scrolls to the top of the file End Scrolls to the bottom of the file. WNBROWSE.INI options file ------------------------- A large number of WnBrowse options can be changed to match your exact requirements, these include the colour scheme, default font etc. To avoid having to reset these settings each time you start WnBrowse, you can save these settings by using the 'Save Settings' command on the Options menu. WnBrowse saves all the settings in a private INI file in the Windows directory as WNBROWSE.INI. No changes are made to any of the Windows INI files. Most of the options in the wnbrowse.ini file are created when the Save Settings option is selected. Others, such as print options, are created when they are changed. These should therefore not be changed by other means, such as with a text editor, doing so could cause unpredictable behavior. Options that must be entered with an editor are detailed below : ExitOnEsc=1 or 0 (default is 0) This option modifies the behaviour of the Escape key. When set to '0' (or missing), the Escape key causes WnBrowse to close the current file and iconize. When set to 1, the Escape key will cause WnBrowse to Exit. Buffers=n (n is 0 to 5, the default is 5) This option specifies how many buffers are used to store data from files being browsed. Each buffer is approximately 30k in size. All such buffers are freed if Windows becomes short on storage. MaxTextSize=n (n is 0 to 114, the default is 12) This option specifies the largest file size (in megabytes) that can be browsed in text mode. Any file larger than the specified size will be treated as a 'non-text' file. Named Saved Options ------------------- WnBrowse also allows you to save options as named configurations, allowing you to specify the named configuration at run time. To do this you must tell WnBrowse the name of the INI configuration to use at startup. This is done by passing the required name as a command line parameter. WNBROWSE.EXE -Iname The dash character indicates a WnBrowse parameter, the 'I' specifies that an INI configuration name follows, 'name' can be any name you like (less than 20 characters). Customizing File Open Filters ------------------------------ When you select the File open command (or click the open button), the common Windows file open dialog box is displayed. Included is a list box (List files of type) containing file filters. You can use your own list of filters by adding a parameter to the WnBrowse options file (WNBROWSE.INI). The filter string should consist of one or more pairs of strings separated and terminated by a unique character. For example to allow for the selection of TXT files or INI files you would code : FilterSpec=Text Files (*.TXT)|*.TXT|INI Files (*.INI)|*.INI| You may also combine filters into a single selection by separating them with a semicolon, for example : FilterSpec=Text Files (*.TXT;*.DOC)|*.TXT;*.DOC| The First filter in the list is used as the default. The default filter used by WnBrowse is : All Files (*.*)|*.*|Text Files (*.TXT)|*.TXT|INI Files (*.INI)|*.INI| ZIP Files (*.ZIP)|*.ZIP| Note : WnBrowse does not perform any sanity checks on the supplied string. Failure to provide a valid string will produce unpredictable results. Removing WnBrowse from your system ---------------------------------- If after evaluating WnBrowse you decide not to register it, you must remove it from your system. To do this delete the following files : WNBROWSE.EXE WNBROWSE.HLP WBFXTEN.DLL WNBROWSE.TXT WNBZIP.BAT WNBZIP.PIF If you also copied the BWCC.DLL file to your hard disk, this file should also be deleted. DON'T delete this file if you had a copy before WnBrowse was installed ! If you saved the WnBrowse settings, delete the file WNBROWSE.INI from your Windows directory (usually C:\WINDOWS). If you installed the WnBrowse File Manager extension, you should remove the appropriate line from the [Addons] section of WINFILE.INI. Registering WnBrowse ==================== If you like WnBrowse enough to want to continue using it after the evaluation period, you must register it using the procedure below. The benefits of registration are many : * You will have access to free product support. * You will receive details of new versions of WnBrowse (and hopefully other future products). * You will be able to make suggestions for improvements and (horror) report any bugs. * You will enable me to continue to improve and support what I hope is the first of many useful products. * If the version you are evaluating has been superseded, you will also receive a copy of the latest version. Register By Post : ------------------ To register by post, send your cheque, made payable to N.G.Thomas to the following address : Nigel.G.Thomas. 39 Redshank Avenue, Winsford, Cheshire CW7 1SP, England. Please send what you think WnBrowse is worth, I suggest 10 UK pounds. (Please note that at this time I CANNOT accept payment by credit cards, if absolutely necessary, send cash (in Sterling)) Include the following : * Your name * Your address and telephone number. * From where you acquired WnBrowse * The version being evaluated. * Required disk size 3.5 or 5.25. Note : A new disk will ONLY be sent if there is a newer version of WnBrowse available. Any comments on the product would also be appreciated. Register by CompuServe ---------------------- You can also register WnBrowse by using the CompuServe shareware registration service. To access the service, logon to CompuServe and access the SWREG service (GO SWREG). The CompuServe registration ID for WnBrowse is 1108. When you register via SWREG, the cost is a fixed 15 US dollars. Registering Multiple Copies --------------------------- For details on registering multiple copies of WnBrowse, please contact me at the above address. I can also be contacted on CompuServe, my ID is 100117,1542. The Legal Stuff --------------- WnBrowse is supplied as is. The author disclaims all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose. The author assumes no liability for damages, direct or consequential, which may result from the use of WnBrowse. WnBrowse is a "shareware program", and is provided at no charge for you to evaluate for a reasonable period of time. You may also pass copies of WnBrowse to friends so that they may also evaluate the product. If you do pass on WnBrowse, you must do so without modification, including all of the supplied files. If you find WnBrowse useful and wish to continue using it, you must register it using the procedure outlined above. Once you have registered WnBrowse, you may continue to use this version, and ALL future versions of WnBrowse, without further charge. Techi stuff + Thanks -------------------- WnBrowse was developed on an IBM PS/2 model 70 under Windows 3.0 and a Dell 466/T under Windows 3.1. It was written in the C language and was compiled using the Borland C++ compiler version 3.1. The ICON was provided by Arthur. Thanks Arthur ! A number of people have contributed to the design of WnBrowse by providing constructive criticism and suggestions for improvements. Thanks to all, but particularly to Tom and Jack. Release History --------------- 13/05/91 1.00 Initial release 21/05/91 1.01 Allow filename to be passed as a parameter 07/06/91 1.02 Fix horizontal position when re-sizing bug support for Ruler display double-click scroll function Selectable font facility Print support 12/07/91 1.03 Fix bug in Printer support 21/08/91 1.04 Added find support 20/09/91 1.05 Force standard size of initial window Allow text display of hex type file Online help added Support EBCDIC translation for IBMers 17/10/91 1.06 Added clipboard support 18/11/91 1.07 Process SB_THUMBTRACK on vertical scroll Extend Printer support 31/01/92 2.00 Modified to use Borland Window controls (BWCC) Support for initial window size on startup 05/02/92 2.01 Fix to ColoursProc to avoid the dreaded UAE fix to put window in required place Support file position saving facility 13/02/92 2.02 Fix to correctly save the font type fix to correctly process the command line support for international character sets 15/02/92 2.03 Support for large files Support for file information display Support for GOTO dialog 28/02/92 2.04 Support for status line Fix to prevent menu options being grayed in error 05/03/92 2.05 Fix to correct selection of single line of text Allow named saves to be made to the ini file Added more status line messages Finally added hex search support Menu status (suppress/display) saved in INI file 26/03/92 2.06 Support for displaying next/prev file 24/04/92 2.07 Fixed a few small bugs Changed text selection to character vs line Added file list popup dialog Allow user to set non-text line length Add drag and drop support - 3.1 At Last ! Added an extra colour choice - Grey 21/05/92 2.08 Improve printer setup Support for wild-cards in command line Support file printing via association (-p command) Support for floating ICON Total revamp of colour selection dialog 05/08/92 2.09 Add call to DragFinish and use 3.1 SDK 14/08/92 3.00 First shareware version Added button bar Added Nag Box and registration Dialog 17/02/93 3.1 Second shareware version : Use common dialogs for file open and font selection Improved the look of the button bar Fixed a couple of well hidden bugs Nag Box and registration dialog removed ZIP File support 22/03/93 3.2 Bug fix + Fixed colour dialog to work with new BWCC.DLL Fix Open dialog to corectly save long path names Allow font sizes to be saved under Windows 3.0 Add Save As support. Add Select All menu command. 02/07/93 3.3 Fixed some smallish bugs Support for viewing ZIP files Circumvent bug in WinDows NT beta. Added Find Scroll to Top support. 01/09/93 3.4 Bugs fixed Extended search options Print using default font Extended file information Size limit removed (sort of). ---------------- Windows is a trademark of Microsoft Corporation PS/2 and OS/2 are trademarks of International Business Machines Ltd. PKUNZIP is copyright PKWARE Ltd.