IMG Home PageIMG ProductsProduct DownloadsOrdering InformationTechnical Support and Frequently Asked QuestionsDeveloper's Corner and UtilitiesAbout IMG
CustomersIMG ResellersMedia InformationIMG Events / Trade ShowsUseful LinksIMG Contact InformationIMG Information / Policies
Translate

The Magnifier

FOLDER: Magnifier

TYPE: Utilities / Stand-alone Executables with Source

SOURCE: INCLUDED

LANGUAGE: C / Windows API / Visual Basic / C#

IDE: Microsoft Visual C++ 6 / Visual Basic / Visual Studio 2005

We have been asked if the Magnifier can be controlled externally for integration with other applications, and with the release of The Magnifier 1.50, some tools and capabilities have been created for developers interested in controlling The Magnifier window / software.

These are the capabilities available:

Open - Launches The Magnifier (up to 7 windowed magnifiers can be running at one time)

Close - Closes The Magnifier

Close All - Closes all instances of The Magnifier

Status - Obtains status from The Magnifier - is it running, is it a window or in full screen mode, are colors inverted or normal, is it visible or hidden.

Set Magnification factor - 1x-9x

Set Magnification point - this can reposition the mouse cursor (normal magnification point), force the point so the mouse/text caret/keyboard focus are NOT referenced, and clear the forced point

Move / Size - As a window, The Magnifier can be repositioned, resized as desired.

Get Position - obtain The Magnifiers current position (screen coordinates)

Get Size - obtain The Magnifiers windows width & height

Invert Colors - toggles inverted colors or normal colors

Show / Hide - toggle The Magnifiers visibility - if visible, hides, if hidden, shows

Full Screen - go to full screen mode

Window - go to windowed mode

Note that most utilities assume only 1 magnifier is running, as they use the API FindWindow, and the first instance / topmost magnifier window will be used.

There 4 main areas of interest:

Magnifier DLL (MAGDLL folder) - This is the core of these utilities. This DLL communicates with The Magnifier window. All other utilities interface with the DLL, which then interfaces with The Magnifier. This is a DLL written in C, has a workspace for Microsoft Visual C++ 6. It is built with exported functions seen by other apps as __stdcall (which is PASCAL or WINAPI).

MagControl (root Magnifier folder) - this is a C based console utility (Command Prompt utility) that can be driven by commands typed at the prompt. Integrating the C code with a C / C++ based utility from this example should be trivial.

Visual Basic - Built in VB 6, this has a single form with buttons that show off all the capabilities of the Magnifier DLL. There is a Module that shows the DLL integration required by Visual Basic.

C# / .NET - Built in Visual Studio 2005 from a sample C# application, a single form shows off all the capabilities of the Magnifier DLL (exactly the same as the Visual Basic example). There is the MagDLL class that shows the Magnifier DLL integration required by the C#/.NET environment.

The following assumes you have The Magnifier installed.

The Visual Basic and C# examples just need you to open the project in the appropriate IDE, and run them - the operation is straightforward and should be obvious - Open The Magnifier (if not already running) and click on the buttons. All the code is included and it should be easy to merge or integrate these capabilities with existing projects for any capable developer.

If you just want to explore these capabilities & dont have an IDE, the MagControl command line utility can be used. Also, this can be integrated within any high-level App (e.g. Microsoft Access, LabView, etc.) that can Shell or launch an external command.

For those that need or want some guidance, here is a quick step-by-step guide to see these capabilities in action.

Step 1 - Make sure The Magnifier is installed, download and unzip the Developers Kit (e.g. Check for Updates from the Magnifier Advanced Menu)

Step 2 - From the Start Menu, run CMD - e.g. in Vista, just type CMD and [Enter], or select Start Menu | Run, then type CMD and [Enter]

Step 3 - Change to the Magnifier developers kit folder, e.g. CD \Program Files\The Magnifier\Magnifier

Step 4 - Type these command (in bold) with descriptions as - description here

C:\Program...> MagControl open[Enter] - opens the magnifier

C:\Program...> MagControl fullscreen[Enter] - goes to full screen

C:\Program...> MagControl setmag 4[Enter] - 4x Magnification

C:\Program...> MagControl setmag 2[Enter] - 2x Magnification

C:\Program...> MagControl window[Enter] - to window mode

C:\Program...> MagControl movexywh 100 300 400 100[Enter] - moves window

C:\Program...> MagControl showhide[Enter] - hide magnifier

C:\Program...> MagControl showhide[Enter] - shows magnifier

C:\Program...> MagControl invert[Enter] - inverts color

C:\Program...> MagControl status[Enter] - shows magnifier status

C:\Program...> MagControl currentxy[Enter] - shows current screen position

C:\Program...> MagControl currentwh[Enter] - shows current window width/height

C:\Program...> MagControl invert[Enter] - inverts color

C:\Program...> MagControl close [Enter] - closes the magnifier

Developers Kit Version 1.78 Release 3 - 9/27/2007

Copyright 2007 by Innovation Management Group, Inc.

All Rights Reserved.


IMG Home PageIMG ProductsProduct DownloadsOrdering InformationTechnical Support and Frequently Asked QuestionsDeveloper's Corner and UtilitiesAbout IMG
CustomersIMG ResellersMedia InformationIMG Events / Trade ShowsUseful LinksIMG Contact InformationIMG Information / Policies