Magnifying The Desktop With Visual Basic

Our magnifier app

Start by loading Visual Basic 6 and create a standard executable application. We will be using a status bar control on our form, so use the Projects -> Components menu to add a reference to the windows common controls version 5 or 6:

Set your forms caption to "Desktop Magnifier", change the ScaleMode property to "3 – Pixel", and resize your form to 6990 wide by 4410 units high. Add a timer control, a vertical scroll bar, and a status bar to your form.

The details of each of the three controls on our form are shown below:

  • Timer: Will contain the code to grab the contents of a section of the desktop and magnify it accordingly. Set its interval property to 50.
  • Vertical Scroll Bar: Will be used to set the zoom of the magnifier. The lower the value, the deeper the zoom. Set its Min property to 1, its Max property to 100, and its Value property to 50.
  • Status Bar: Will display the x and y co-ordinates of the mouse as it moves around the desktop.
Now that we've setup our form, let's add the Window API declarations and code to actually perform the magnification of the desktop.

You might also like...

Comments

About the author

Mitchell Harper Australia

Visit http://www.devarticles.com for more articles and free programming eBooks, or visit Socket6.com for your dose o...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“A computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match” - Bill Bryson