Copyright: © 1995 Nigel G Thomas


WnBrowse Topic Index

WnBrowse 4.0

WnBrowse 4.0 is a file viewer for the Windows 95 operating system. Version 4.0 will also run under version 3.51 of Windows NT, with or without the Windows 95 shell.


File Menu Commands

Open

Opens a new file.

When you select the Open command you are presented with the Open File dialog box. From there you can select the file that you want to browse. If the selected file is a text file, then the  initial viewing mode will be text, otherwise the hex viewing mode will be selected.

Related Topics

   View Mode

   File Types

Save As...

Displays a Save As dialog box from where a file can be selected for saving the currently selected text. This option is grayed when no text is selected.

Close File

Closes the current file, releases any storage and iconizes WnBrowse.

Launch

Launches the current file, with it's associated application, or with the default text editor. If the file being viewed is a Windows 16 bit program, it is executed.

Delete

After confirming that you wish to proceed, the current file is deleted. If the Load next/previous file after delete option is on, the next or previous file will be loaded after the current file has been deleted.

Previous

Displays  the previous file from the list of currently selected files.

Next

Displays the next file from the currently selected files.

Print...

The Print option can be used to print the entire file, or a selected portion of a file on the currently active printer. A dialog box is displayed allowing various options to be selected.

Related Topics

   Selecting Text

   Print Options

Page Setup

Presents a dialog box from where you can select options that define how each page of printed output will appear when printed. Options include margin sizes and header/footer formats.

Related Topics

  Page Setup

Printer Setup

Presents a dialog box from where you can select the printer to use and set printer options, such as page size and orientation.

Show Information...

Displays a dialog box containing information about the currently selected file, including the file size, modification date and version information

Exit

Exits WnBrowse


Edit Menu Commands

Copy

Copies any selected text to the Windows Clipboard.

Select All

Quickly selects the entire contents of a file. Selected text can be copied to the Windows clipboard, printed, or saved to a file.

Edit File

Edits the current text file using the default editor. The default editor is set from the Preferences dialog on the Options menu.


Search Menu Commands

Find

Displays the find dialog box from where you can search for a character string within the file being browsed. The following options can be selected :

Find What

Enter the string to be searched for. This can be entered in ASCII or hexadecimal

Direction -

Specifies the direction of the search, backwards or forwards.

Origin -

Specifies from where the search commences. Entire Scope searches from the top or bottom of the file. Current position searches from the top or bottom of the current window.

Options -

Match Upper/Lower case - string comparison is case sensitive

Scroll to - Matching lines are scrolled to the top or middle of the window

Find Next

Following a successful find, finds the next occurrence of the same string within the file.

Find Previous

Following a successful find, finds the previous occurrence of the same string within the file.

Goto

Displays a dialog box from which you can select the new file location.

In text view mode, enter the line number.

In Hex view mode, enter the hexadecimal offset.


View Menu Commands

Text Mode

The selected file is displayed in text mode.

Hex Mode

The selected file is displayed in hex mode.

View ZIP File Contents

Displays information about the contents of a ZIP file.

Redisplay Zip File

Redisplays the Zip file containing the Zipped file being viewed.

Lock/Unlock Text

Locks or unlocks rows and/or columns of text. For details, see Locking Text

Increase font size

Increases the current display font size. If already at the maximum size, a warning beep will be sounded. The font size can also be increased by pressing the + key on the numeric pad.

Decrease font size

Decreases the current display font size. The minus key on the numeric pad can also be used to decrease the current font size.

Related Topics

   View Mode

   Viewing Zip Files


Options Menu Commands

Select Font

Selects the font to be used for displaying and printing the selected file.

Related Topics

   Font Selection

Preferences...

This item displays a dialog box from where you may specify your preferences for many  of the WnBrowse  options. For details, see Setting Preferences

Customize Tool Bar...

Displays a dialog box from where you can customized the appearance of the tool bar. For details, see Customizing the Tool Bar

Colours

Displays a dialog box that allows the colours of certain WnBrowse elements to be selected.

Set Line Length

Sets the  display length for lines of non-text files using the text viewing mode.

Save Settings

Saves the currently active options, (Font, Ruler, tabs, scroll bars and Colours), so that they  are automatically used every time WnBrowse is started.


Common Questions

Below are some are the most common questions asked by WnBrowse users, along with their answers:

Q. Some of the text files I browse are displayed as non-text in hex view. Why is this, and what can I do about it ?

A. WnBrowse classifies a file as text or non-text when it is opened. It does this by checking each line within the file to see if it is too long. In earlier versions the default maximum length was 256. In this version, the maximum has been increased to 1024. The Line Wrap option can be used to wrap long lines into two or more lines, making them easier to read.

Q. When I close a file by selecting Close from the File menu, WnBrowse closes the file and minimizes. Why does it do that ?

A. If you are viewing a file and want to view a different one, there is no need to close the first file, simply open the new one by selecting Open from the file menu, or by using drag and drop etc. When you close a file, the assumption is that you have finished viewing files for a while and therefore WnBrowse iconizes.

Q. When I press the Esc key, Wnbrowse closes the file being viewed and iconizes. I would rather it closed WnBrowse. Is this possible ?

A. Yes, to change the default behavior of the Esc key, select the Keys tab in the preferences property sheet. If you want to make the setting permanent select Save Settings from the options menu.


Setting Preferences

The Preferences menu item on the Options menu displays a dialog box from where many WnBrowse options can be set. Each set of preferences is presented on a separate property sheet.

Conversion

When the EBCDIC to ASCII option is selected, any EBCDIC characters are converted to ASCII before being browsed or printed. This option is useful when browsing or printing a file downloaded from an IBM mainframe computer.

The OEM to ANSI option can be used to translate OEM characters (such as box drawing characters) to their ANSI equivalents. This option should be set off when browsing files containing special national language characters.

The Line Wrap option will wrap long lines into to or more lines, avoiding the need to scroll right to read them. This option takes effect the next time a file is opened.

Display

When the Ruler option is set, a ruler will be displayed at the top of the output window while in text view mode.

When the Scroll Bars option is set, scroll bars are displayed if the file length or width exceeds the output window size. If this option is not set, scroll bars will not be displayed and the keyboard must be used to scroll the file.

The Status Line option, when set, causes a Status line to be displayed at the bottom of the output window.

The Tool Bar option, when set, results in the display of a tool bar at the top of the output window.

Tabs

The Expand Tabs option controls whether embedded tab characters within the file will be expanded when the file is viewed or printed.

The Tab Size value specifies the number of characters between each tab stop. This value must be between 2 and 16.

When tab expansion is turned off, you can specify that embedded tab characters are to be displayed as blanks.

Launch

The Default Editor input box contains the name of the editor that is to be used to edit text files when the Launch option is used.  If the name is blank, then editing will not be allowed.

When the Minimize on Launch option is set, WnBrowse will minimize after a file is launched via the Launch button, or Launch command.

Keys

You can set the default behaviour of the Escape key, the Home key and the End key.

Miscellaneous

When the Load next/previous file after delete option is set, WnBrowse will load the next (or previous) file after the current file is deleted. This option allows you to browse through a selection of files, deleting unwanted files as you go.

If the Auto Zip option is set, a Zip file containing a single file will automatically be expanded when the View Zip file contents option is used.

Any changes that you make using the Preferences dialog effect the current execution of WnBrowse only. If you wish to save the settings for all future executions, you should select 'Save Settings' from the Options menu.


Customizing the Tool-Bar

Customizing the Tool Bar

You can add, remove, and alter the position of buttons on the tool bar from the Customize Tool Bar dialog selected from the Options menu. You can also customize the tool bar by double clicking in a space between buttons.

Adding a button:

Select the button that you want to add from the list of available buttons in the listbox on the left of the dialog.

Select the button in the tool bar listbox to indicate the position where you want the new button added. The new button will be added above the selected button (to the left on the tool bar). If you do not select an insertion point the new button will be added to the end of the tool bar.

Press the Add button.

Removing a button

Select the button that you want to remove from the tool bar listbox.

Press the Remove button. The button will be removed from the tool bar listbox, and added to the list of available buttons.

Changing the position of a button

Select the button that you want to move.

Move the button up or down by pressing the Move-Up or Move-Down button respectively.

When you have finished customizing the tool bar, press the Close button to save your changes.

Using Drag and Drop

You can also customize the tool bar by using drag and drop. To do this press the shift key and click and hold the left mouse button over a button. You can then drag the button to a new location on the tool bar, or delete it by dragging it off the tool bar.

You can also use drag and drop to move buttons from the customize tool bar dialog.


File Information Dialog

The file information dialog can be requested by selecting 'Show Information...' from the File menu, or by clicking on the information button in the Tool Bar.

Depending on the type of file being viewed, some or all of the following information will be displayed :

File Name

The full path name of the file that is being browsed. Long path names will be truncated to fit in the dialog box by replacing some directory levels with ellipses ('...').

Type

The type of file being browsed. WnBrowse primarily classifies files as text or non-text. Some types of files are further classified as specific types if possible. This includes Zip files and program executables. If the file being browsed is a member of a Zip file, this will also be indicated. Any file that has an associated application is also identified.

Size

The size of the file being browsed is displayed in bytes and in kilobytes.

No. of Lines

For text files only, the number of lines in the file is displayed.

Last Modified

The date and time that the file was last modified is displayed.

Attributes

The attributes of the file (archive, read-only, hidden and system) are displayed.

Program Version Information

If the file being browsed is a Windows 32 bit executable (EXE,DLL etc), WnBrowse will check to see if it contains version information. If such information is present, the File Information dialog is expanded to display the following information:

Version

The version of the file being browsed. The exact format of the version information will vary and is dependent on the programs authors requirements.

Company

The name of the Company that produced the file being browsed.

File Description

A description of the file being browsed. The level of detail provided by this information is again dependent on the programs author, but should be useful in recognizing what the file is used for, or what application it belongs to. If version information is not available for the file being browsed, WnBrowse will check to see if a program description has been included in the executable. If it has, it will be displayed here.

The program version information can be useful in determining what a file is used for, and can assist in tracking down and deleting remnants of discarded products. It can also be interesting  to know what some of those strangely named DLL's are actually used for !

Imported DLL List

If a 16/32 bit Windows EXE or DLL file (or an OS/2 1.x executable) is being browsed,  a list of DLL's that are imported can be displayed by selecting the More... button. This information can be useful in determining what application a DLL file belongs to. You should be aware however that a DLL might be used by an application even if it is not on the list of imported DLL's.

Related Topics:

File Types


Viewing Mode

View Modes

WnBrowse can display files in two ways or modes. The initial view mode is selected automatically according to the file type,  but can be changed from the view menu or Tool Bar.

Text Mode

The file is displayed line by line. Scroll bars are provided if necessary for both vertical and horizontal scrolling.

If the file is a non-text  file, then the file is displayed with 75 characters per line. This can be changed by selecting 'Set Line Length' from the Options menu.

Related Topic

   File Types

Hex Mode

Each display line is separated into three parts.

1. The offset into the file of the line in hex.

2. 16 bytes of the file displayed in hexadecimal.

3. the ASCII or EBCDIC translation.

When hex mode is selected, WnBrowse will switch to a fixed font if necessary.

Related topics

   View Menu Commands


File Types

When WnBrowse opens a selected file, it classifies the file into one of three types.

Text File

A text file consists of one or more lines of text, each containing 256 characters  or less, separated by  ASCII NL/CR characters. Text files are presented initially using the text viewing mode.

Note: The 256 character per line limit can be changed to any value between 80 and 1024 by adding or changing  the following parameter in WNBROWSE.INI

MaxLineLen=nnn

Where 'nnn' is the required line length limit.

Non-Text File

Any file that does not meet the criteria for a text file, is considered to be a non text file. All such files are presented initially using the hex viewing mode.

While it makes no sense to display some non text files in the text viewing mode, for example EXE files. some files that WnBrowse classifies as non text , contain large amounts of text, best read using the text viewing mode. Such files include word processing files.

ZIP Files

All non-text files are checked to see if they are ZIP files. Such files are processed by WnBrowse as for non-text files, except that their contents can be listed from the View menu or Tool Bar.

File Information

The File Information menu option (or the information button) can be used to display information about the file being browsed. Displayed along with other file details is the file type. For non-text files, WnBrowse will attempt to identify what type of file is being displayed. Currently WnBrowse recognizes Windows 16 bit, Windows NT and OS/2 executables. For Windows 16 bit files, WnBrowse will  display the file description and version and company name (if available).

Related topics

   View Mode

   Viewing Zip Files

   File Information Dialog


Keyboard Usage

F1	Displays the Help index
F3	Finds the next match
F9	Finds the previous match
Ctrl-T	Selects text view mode
Ctrl-H	Selects hex view mode
Ctrl-M	Toggles the menu display option
Ctrl-P	Prints the current file
Ctrl-S	Saves the current options
Ctrl-Page Up	Displays the previous file
Ctrl-Page Down	Displays the next file
Page Up	Scrolls back one window full
Page Down	Scrolls forward one window full
Up Arrow	Scrolls back one line
Down Arrow	Scrolls forward one line
Left Arrow	Scrolls left eight positions
Right Arrow	Scrolls right eight positions
Home	Scrolls to the top of the file
Ctrl-Home	Scroll to the top/left of the file
End	Scroll to the bottom of the file
Ctrl-End	Scrolls to column 1 of the file

The behaviour of the Esc,Home and End keys can be changed from the Keys section of the preferences dialog.


Font Selection

WnBrowse supports fonts for both displaying and printing the selected file.  Fonts are selected by using the Select Font command from the options menu. The number of fonts available will vary according to the currently selected printer.

Sometimes WnBrowse will select a new font automatically. For example if you switch from text view mode to hex view mode WnBrowse will ensure that a fixed font is being used. When you switch back to text view mode, the original font will be restored.

Related Topics

   Options Menu

   View Mode


Selecting Text

You can use a mouse to select text from the file being browsed. The selected text is displayed in a different colour to distinguish it from the unselected text. You can copy selected text to the clipboard, print it on an attached printer, or save it to a file.

Select text using the following procedure.

1.Move the cursor to the first or last character you wish to select.

2.Press and hold the left mouse button. The cursor will change.

3.Drag the mouse, up or down , left or right, until you have selected the required text.

4.Release the mouse button.

If you move the mouse above or below the WnBrowse window, the text will be scrolled while being selected.

Selection Hint :

If you want to select a large portion of the file, click and hold the mouse before the first character required, then press the Page-Down key to select text a page at a time.


Viewing ZIP Files

WnBrowse allows you to browse the files contained within a ZIP file without having to unzip the entire file first. When WnBrowse opens a file, it checks to see if it is a normal ZIP file or a self extracting ZIP file. If it is, the View menu option 'View ZIP file contents' and the ZIP button are activated. Selecting either of these will display a scrollable list of the files contained within the ZIP file. Also displayed is the total size of the ZIP files and the level of PKUNZIP needed to unzip them.

If a file in the list is double-clicked, or if  a file is selected and the View button pressed, WnBrowse will unzip the selected file and display it. After the viewing of the file is completed, WnBrowse will delete the unzipped file.

When a zipped file is being displayed you can redisplay the original ZIP file by pressing the redisplay ZIP file button on the tool bar or by selecting Redisplay Zip file from the View menu

WnBrowse uses the PKUNZIP program to unzip any selected file. Therefore, you must have a copy of PKUNZIP.EXE on your system. The level of PKUNZIP must also match or better the level required to unzip the selected file.

When you browse a zipped file, WnBrowse creates a temporary file, and deletes it after browsing is complete. By default, the temporary file is placed in the directory defined by the TEMP environment variable, or in the root directory  of the disk containing Windows, if there is no TEMP variable.

NOTE	To avoid the possibility of inadvertently overwriting a file in your root directory, it is strongly recommended that you define a temporary directory.


Print Options

The print dialog box can be used to select a number of print options.

Print What

You can print the entire file, or only those lines that have been selected.

Options

The 'Use default printer font' option causes the file to be printed using the printers default font, rather than the currently selected WnBrowse display font.

If 'process form feeds' is set, embedded form feed characters (hex '0C') will be honored, and a new page started.

If the 'Wrap print lines' option is set, lines that are too long to fit within the selected margins will be split and printed on two or more lines. If possible, the split will be made at a word boundary.

If the 'print headers and footers' option is set, header and footer lines will be printed at the top and bottom of each page.

Note : When you select the process Form Feed option, you should make sure that the current page size is large enough to accommodate the resulting pages.


Page Setup

Headers and Footers

Header and footer lines optionally printed at the top and bottom of each page should be defined here. Along with the text in the header and footer string, you can include the following special codes:

&d	Inserts the current date
&t	Inserts the current Time
&p	inserts the current page number
&f	inserts the file name
&l	Draws a line below the header or above the footer
Along with the special codes, you can use the '/' character to left justify, right justify and centre the text contained in the headers and footers. For example :

left/centre/right

Will print 'left' left justified, 'right' right justified and 'centre' in the centre of the page.

//Page &p

Prints 'Page n' right justified .

Header and footers are only printed if the option is selected from the Print dialog.

Margins

You can set the sizes required for the page margins, left, right, top and bottom. The units used, inches or centimeters, depend on the settings made via the Windows control panel. The right page margin is ignored unless the option 'Wrap print lines' is set in the print dialog box.

Print Font Selection

The font used to print headers and footers and the contents of the file can be set. If the check box Use selected font is clear, the currently selected display font is used. If Use Selected font is selected, the font selected via the ‘Select...’ button will be used. Once a font is selected, it is saved for automatic use the next time WnBrowse is run.


Command Line Options

The command line can be used to pass the name of the files to be browsed and/or parameters defining WnBrowse options. A parameter is distinguished from a file name by preceding it with a dash (-).

Specifying the Window Size and Position

The window size and position is  given as four values, respectively the position of the upper left hand corner of the window, and the width and height of the window. All values are given in  pixels.

-100 150 300 400

This  results in a window  with a top left hand corner positions at X and Y (100,150) with a width of 300 pixels and a height of 400 pixels.


Tool Bar

The WnBrowse Tool Bar allows you to perform many operations with a single click of a mouse button. You can customize the Tool Bar using the procedure described in Customizing the Tool-Bar

The buttons available are:

Displays the file open dialog box.

Browse the previous file.

Browse the next file.

Print the current file.

Display information about the current file.

Copy selected text to the Windows clipboard.

Search the file for a character string

Repeat the previous search.

Display the file in the text view mode.

Display the file in the hex view mode.

Display the files contained within a ZIP file.

Select a font.

Set your colour preferences.

Display the WnBrowse help.

Launch the file with it's associated application.

Redisplay the previous ZIP file

Close the current file and Iconize

Exit WnBrowse

Goto a file location

Edit the current file.

Delete the current file

Lock or unlock selected rows/columns

 Increase the font size

 Decrease the font size

If a button is not currently active then it will be grayed and will not go down when it is clicked. For example, the clipboard button is disabled when there is no selected text, and the launch button is disabled when the file has no associated application.

If the mouse cursor is moved over a button on the Tool Bar and left there, the function of the button will be displayed in a tooltip.


Registering WnBrowse

WnBrowse is a shareware product. This means that you can use  WnBrowse for a reasonable  amount of time without charge for evaluation purposes. If you decide to keep WnBrowse, you must register your copy by sending payment to the author. You can also pass on WnBrowse to friends and colleagues so that they may also evaluate the product.

You can also register WnBrowse using the CompuServe shareware registration process. Simply go to the SWREG service (GO SWREG) and follow the online prompts. For details refer to WNBROWSE.TXT.

When you register WnBrowse you will receive many benefits :

*  You will have access to free product support.

*  You will receive advanced details of new versions of this and other products.

* You will be able to request changes to WnBrowse to help me make it a better tool.

* You will allow me to continue to support this and other tools in the future.

For further details please refer to the file WNBROWSE.TXT .


Locking Text

Locking and Unlocking Text

Occasionally you may wish to view a file that contains embedded column and/or row headings. In such cases, it would be useful to be able to lock them in-place so that they do not scroll along with the rest of the file contents.

To lock text, select Lock/Unlock text from the View menu, or click the Lock/unlock button. The file will be positioned at the top, and a set of cross-hairs will be displayed in the text area. These can be moved with the mouse to select the columns and rows of text that are to be locked. Clicking the left mouse button, or pressing Enter makes the selection. Pressing Esc cancels the locking operation.

If you want to lock rows of text only, without locking any columns. For example to lock page headings, move the cross-hairs to the right of the window until the vertical bar disappears.

Locked text is displayed in a different colour from unlocked text. The colour to use can be specified from the Select Colours menu option.

To clear locked text, select Lock/Unlock text from the view menu, or press the Lock button.

Note: You can only lock columns if you have a non-proportional font selected, Courier for example.


Author

Nigel G Thomas. I can be contacted at 39 Redshank Avenue, Winsford, Cheshire CW7 1SP, England or on CompuServe (ID 100117,1542). I would love to hear your comments and suggestions.


ZIP File

A file format that enables one or more files to be contained in a compressed format in a single file, commonly used to ship files on disk or via a communications link. The format and supporting programs (PKZIP and PKUNZIP)  are copyright PKWARE Inc.


Translates the file from EBCDIC (used on mainframes) to ASCII (used by PCs)


Translates characters within the file from OEM to ANSI


Wrap lines that are longer than the Wrap Column value


Minimize WnBrowse after launching a file


Maximize the window of launched applications


Specify the path and filename of the editor to be started via the Edit File command


Display a ruler at the top of the window


When set, scroll bars are provided if required. If not set, scroll bars will not be displayed


Display a status bar at the bottom of the main window


Display a customizable tool bar at the top of the main window


When selected, tabs within the file will be expanded


Specifies the width of each tab column


If tab expansion is off, tabs embedded within the file will be displayed as blanks


If tab expansion is off, tabs embedded within the file will not be changed to blanks, and will display as small squares


If a Zip file contains a single file, the View Zip contents command will unzip and display that file, bypassing the list of included files


If the file being browsed if deleted, the next (or previous) file will be displayed if one is available


When set, WnBrowse will terminate if the Esc button is pressed


When set, WnBrowse will close the open file and minimize if the Esc button is pressed


When set, WnBrowse will minimize without closing the current file when the Esc button is pressed


Use the Explorer style open file dialog. When using the Explorer dialog, the WnBrowse Next/Previous commands will not be available


When Line Wrap is selected, lines longer than this value will be wrapped onto two or more lines. The wrap will only take place at a word boundary


The Home and End keys will perform as in previous versions of WnBrowse. Home will scroll to the top of the file. End will scroll to the bottom


The Home and End keys will perform in the normal Windows manner. Home will scroll to column 1. End will scroll to the end of the longest visible line. Ctrl-Home will scroll to the top of the file and Ctrl-End will scroll to the bottom of the file.