Lens 2.03: A Windows Magnifier, by Ned Konz, July 1995

This file is mostly the same as the Windows help file (LENS.HLP)
that comes with LENS, except for the part about installing Lens.
You might like to install Lens and look at the help file instead.

Installing Lens

Lens 2.03 comes as a PKUNZIP 2.04g ZIP file. Prior versions were
distributed as self-extracting archives, but the norm seems to be
the .ZIP format.

To install Lens, you should go to the MS-DOS prompt, change to the 
directory in which you want to install Lens (or make a directory for 
Lens first), and run the PKUNZIP.EXE program from that directory.

For instance, if you want to install Lens to your existing directory
called C:\UTILS, and you had LENS203.ZIP in a directory called
C:\DOWNLOAD, you could do the following:

	c:
	cd \utils
	pkunzip \download\lens203

Alternatively, you could do this:

	pkunzip c:\download\lens203 c:\utils

There are two versions of the .EXE file included: LENS.EXE, which is a 16-bit
version for Windows 3.1, and LENS32.EXE, which is a 32-bit version for Windows/NT
and Windows 95. The main difference besides 16-bit and 32-bit is that the 32-bit
version stores its settings in the Registry.

About Lens

Lens normally magnifies an area of the screen around the mouse pointer. It can 
alternately try to track the caret (the "text cursor") in text applications, if you 
enable Track Caret mode, or it can display a magnified fixed area of 
the screen, if you choose Freeze Location mode.

This is a Windows version of an Amiga program I wrote in 1985. First 
written in 1991, it has been updated through the years, thanks to your 
support. It was written in C++, and compiled using Borland's compiler (for 
the 16 bit version) or Microsoft's Visual C++ compiler (for the 32-bit 
version). I have also produced a version of Lens for the OS/2 2.x Workplace 
Shell.

Lens for Windows, version 2.03 (this version) adds many features, bringing 
the Windows version up to the level of the OS/2 version. It also introduces 
a Win32 (Windows/NT or Windows 95) version in the distribution.

If you feel this program has value to you, I'd really appreciate a payment of 
$5.00 US sent to me at:

Ned Konz
810 21st Avenue North
St. Petersburg FL 33704
USA

I can be reached on the Internet as nedkonz@gate.net or on Compuserve as 
76046,223 .



About the Author

I've been working with microcomputers since around 1975 (that is, as long 
as there have been microcomputers). I helped build an Altair, helped start 
the first computer store in Tampa FL, and started the first computer store in 
Daytona Beach FL.

I got into software by bootstrapping myself from being an electronics 
technician, through doing electronics design, and then into programming.

I found that I didn't get solder burns as much while programming.

My experience includes a fair amount of embedded systems work, robotics, 
and data communications, also publishing, text processing, and typesetting. 
I've programmed in several assemblers, C, C++, and a variety of little 
languages and tool-specific languages.

So far, I've avoided writing database or business software (and hope to 
keep it that way), except for a particularly dreadful 3-month stint doing 
magazine subscription fulfullment using Informix.

Currently I'm working in C++, because it seems to be the best general-
purpose language around for the kind of work I'm doing (embedded systems 
for robotics and process control).

In real life, I enjoy diving, making beer, cooking, motorcycling, and bicycling 
(I rode my bicycle across the US from Florida to Oregon in 1985).

Why do I write shareware/freeware? I enjoy the feedback I get from people 
who use my programs. In the case of Lens, many regular users are vision-
impaired, and Lens makes it easier for them to use their computers. It's nice 
to know that something I found useful or interesting is also useful or 
interesting to someone else.
 
Other shareware/freeware programs I've written (on a fine BBS near you):

  KEYIN (1985)(DOS) -- run an application and feed it keystrokes.
  INTERCEPT (1985)(DOS) -- intercept and report on interrupt/DOS calls 
made by an application.
  LENS (1985)(Amiga)
  SCREENDUMP (1985)(Amiga) -- dump graphics screen to printer
  SWAPDCP (1993)(OS/2) -- allows editing of KEYBOARD.DCP file
  LENS (1993)(OS/2) -- OS/2 PM version of LENS

Let me hear what you think about Lens, even if you don't send any 
money... I rely on user feedback to improve my programs, and would like to 
get yours.



Always on Top mode

Lens can be made to always stay on top of all other windows, even if it 
doesn't have the focus.

To do this, select "Always on top" from the Settings menu, or use the 't' 
key.



Changing Magnification

The magnification may be changed with the Zoom In (+) and Zoom Out (-) 
menu choices. The available range is from 1X to 40X.

The magnification can also be changed using the '+' or '=' key to 
increase magnification, or the '-' key to decrease it.

The .INI file entry "magnification" sets the initial magnification. See 
Saving Settings.


Display Cursor mode

Lens can display the location of the mouse cursor, using a cross to indicate 
the location. You can select whether or not you want to display the cursor 
location, using the "Display cursor" Settings menu choice, or the 'c' key. 



Expert mode

By default, Lens prompts you with a message box every time you try to 
change a setting. To turn off this behavior, select "Expert mode" from the 
Settings menu, or use the 'x' key.

If you select Expert mode, Lens will quietly change its settings when 
commanded.



Freeze Location mode

If you choose "Freeze Location" from the Settings menu, (or type the 'f' 
key), Lens will change its cursor into a magnifying glass, and wait for you to 
position the cursor over an area on the screen and click the left mouse 
button.

Until you disable this mode, Lens will then continue to magnify the area you 
clicked on. If you have Repeat mode enabled, any changes to 
that area of the screen will be represented in the Lens window as they 
happen.



Hiding the Menu Bar

You may choose to display or hide the Lens menu bar.

By default, the menu bar is displayed, but you can change this setting using 
the Settings menu choice "Display menu bar", or by using the 'b' key.

If you have the menu bar turned off, you can still use the System menu to 
change the settings: if you have the title bar displayed, just click on the 
upper-left hand corner of the Lens title bar, and the System menu will pop 
down. If you don't have the title bar displayed, you can use the 
Alt-Space key combination to pop the System menu down.

If you have the title bar turned off, the menu bar is no longer displayed.



Hiding the Title Bar

Lens can be made to hide its title bar (the bar at the top of the window that 
includes the system menu/close button, the title of the program, and the 
minimize and maximize buttons).

This can be done either by selecting "Hide Title Bar" from the Settings menu 
(or the system menu), or by double-clicking on the Lens window.

You can re-display the title bar (and menu bar, if it was enabled) by double-
clicking again on the Lens window.

If you do this, you can still drag the Lens window around using the mouse.

You can also use the System menu to make settings changes, by using the 
Alt-Space keystroke combination to pop the System menu down.



Keyboard shortcuts

KEY	ACTION
t	Always on top mode (toggle)
+, =	Increase magnification
-	Decrease magnification
r	Repeat mode (toggle)
k	Track caret mode (toggle)
a	About Lens
v	Save Lens settings (see Saving settings)
b	Hide the menu bar (see Hiding the menu bar) 
(toggle)
F1	Lens Help (this file)
x	Expert mode (toggle)
c	Display Cursor mode (toggle)
f	Freeze Location mode (toggle)
Alt-Space	Display the System menu



Release Notes

 	Version 2.03, 5 July 1995

Made 32-bit version. Added to standard distribution.

 	Version 2.02, 17 December 1994

Changed mail and Internet addresses.

 	Version 2.01, 15 October 1994

Bug fix version:

 	Re-compiled to work on 80286 processors as well as '386 and 
higher.
 	Fixed bug where save when iconized resulted in bad restart.

 	Version 2.00, 7 May 1994

Added enough new features to warrant a new major version number!

 	Finally fixed 256-color StretchBlt palette bug
 	Real Windows help file
 	Freeze Location mode
 	Always-on-top mode
 	Hide title bar feature
 	Display cursor position feature
 	Changed postal address

 	Version 1.04, 4 July 1993

 	Changed layout of "Usage" message box for better display on NEC 
640x400 displays for Japanese users.
 	Added explanatory text about StretchBlt bug.
 	Removed BIX email address.

 	Version 1.03, 8 August 1992

My first bug report! Fixed bug where repeat mode was never saved. Also 
made it so that changing magnification from the keyboard using the + 
and - keys would cause a window repaint. So now you can leave your 
mouse alone and use the + and - keys to get the magnification you 
want.

 	Version 1.02, June 1992

Changed text of About box.



Repeat Mode

Repeat mode continues to magnify even if the cursor has not moved. This 
mode should be set if you wish to magnify contents of a window which is 
changing on its own without the mouse or the caret being moved, for 
example when magnifying animation. This mode may be a resource hog and 
slow down your system if the timerInterval setting is too short (see Saving 
Settings).

Repeat mode may be turned on or off using the menus, or by using the 'r' 
key (see Keyboard shortcuts).
 



Saving Settings

Lens saves its settings in its initialization file (or registry entry) when you 
choose "Save Settings!", or use the 'v' key. This initialization file (or 
registry key) may be named as a command line parameter to Lens (see 
Starting Lens), otherwise it will default to "LENS.INI", in your 
Windows directory.

If you're using Lens32 (the 32-bit version of Lens), the registry key you 
specify will be under the key "HKEY_CURRENT_USER\Software\NedKonz". 
If you have specified a key name as a command line parameter, this will be 
the subkey name, otherwise it will be "Lens32".

The "timerInterval" setting in this initialization file sets the minimum 
time between magnifications (in mSec). Setting it too low, especially with 
repeat mode ON, will cause your system to slow down. The default setting 
for the timer interval is 200 msec (1/5 second).

A default LENS.INI (for VGA) file follows (with comments)

[Lens]
; top, left, right, and bottom are
; the initial position of the lens window.
; These default to 0, 0, screenwidth/2, and screenheight/2.
top=0
left=0
right=320
bottom=240
; this is the initial magnification (1-20)
magnification=2
; repeatMode and trackCaret are either 1 or 0.
repeatMode=0
trackCaret=0
; timerInterval sets the minimum time
; between magnifications.
; It defaults to 200 mSec (1/5 second)
timerInterval=200
; Setting displayMenuBar to 0 inhibits
; the display of the menu bar in the Lens window.
displayMenuBar=1
; setting displayTitleBar to 0 makes the window
; appear without any title bar or menu bar.
displayTitleBar=1
; setting alwaysOnTop to 1 makes the Lens window
; always appear on top of other windows,
; even if it is not the active window.
alwaysOnTop=0


Starting Lens

Lens may be started from its own icon like any other Windows program.

16-bit version

If you want to use a specific initialization file (see Saving 
settings), name this file in the Command Line entry for the 
program Properties in Program Manager.

For instance, if you wanted to run Lens from the C:\LENS directory, and use 
an initialization file in that directory, you would use a command line of:

C:\LENS\LENS.EXE C:\LENS\LENS.INI

in the Program Properties settings.

By naming specific initialization files, you can have multiple Lens windows, 
each with their own different settings.

32-bit version

If you want to use a specific registry key (see Saving settings), 
name this key in the Command Line entry for the program Properties in 
Program Manager.

For instance, if you wanted to run Lens from the C:\LENS directory, and use 
an registry key named "Fred" (that is, 
"HKEY_CURRENT_USER\Software\NedKonz\Fred"), you would use a 
command line of:

C:\LENS\LENS.EXE Fred

in the Program Properties settings.

By naming specific registry keys, you can have multiple Lens windows, each 
with their own different settings.

Since the registry keys are saved under HKEY_CURRENT_USER, each user 
has his or her own sets of Lens32 settings.



Track Caret Mode

Lens can be told to try to track the caret (the "text cursor") in some text 
applications. To do this, enable Track Caret mode using the menus or the 
'k' key on the keyboard (see Keyboard shortcuts). You can try 
Track Caret mode with Notepad. It also works with the Borland C++ 
integrated development environment.

This mode does not work with all applications. It will not work, for instance, 
with Word for Windows, which doesn't use the built-in Windows calls for 
displaying and moving the caret. Also, since it is impossible for Lens to tell 
whether the caret is actually being displayed, this setting may cause a lack 
of Lens motion when a non-text program is active.

Lens will track the mouse cursor if the caret position in the active window is 
at the upper left hand corner (0,0), otherwise it will track the caret.


