WnBrowse 3.2 ============ 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.2 are : * Support for files of up to 12 megabytes in 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 the contents of a ZIP file. WnBrowse will ONLY run in the standard and Enhanced mode of Windows, it will NOT run in real mode. ********************************************************************** * WINDOWS 3.0 USERS - PLEASE NOTE ! * * * * As shipped, WnBrowse 3.2 ONLY works with Windows 3.1 and above, it * * will NOT work with Windows 3.0 unless you have a copy of the * * Windows 3.1 common dialog DLL COMMDLG.DLL. To save space, this DLL * * is not included with WnBrowse. This also applies to the 2.0 level * * of OS/2 (2.1 supports Windows 3.1) * ********************************************************************** A 32 bit version of WnBrowse for use under the Windows NT system is under development. Installing WnBrowse =================== WnBrowse is distributed as six 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 (Windows 3.1 only) BWCC.DLL - The Borland Window Control Class DLL. README.NOW - Information about 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 two WnBrowse files (EXE and HLP) should be copied to a suitable directory on your hard disk. You should then define WnBrowse in a suitable Program Manager group (refer to your Windows documentation for assistance on this procedure). If you are going to use the File Manager extension, you should also copy WBFXTEN.DLL to your hard disk. Note : In order for Windows to find the WnBrowse help file, it should be copied to a file referenced in your DOS PATH statement. 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 (Windows 3.1 only). 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. =========== 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 3.2 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 Content... ------------------------ Displays information about the files contained within a ZIP file. 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 When WnBrowse is executed under Windows 3.1 (or higher), the Drag and Drop feature can be used to select files. 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 for Windows 3.1, 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. 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. 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. 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 any line contains a new-page ASCII character in position one (hex '0C'), WnBrowse will start a new page before printing that line. When printing files that contain new-page characters, 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. 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. Saving Options -------------- 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. 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| 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 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. To get all of the above send a cheque or money order 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. 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. ---------------- Windows is a trademark of Microsoft Corporation PS/2 and OS/2 are trademarks of International Business Machines Ltd. PKUNZIP is copyright PKWARE Ltd.