Library tutorials & articles

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.

Comments

  1. 06 Mar 2005 at 18:54

    i am solving similar kind of problem...


    But i doing that in c++. well i found something in msdn. Using GetCursorInfo() one can get the cursor info. and then one can use the drawIcon() to draw. but i am not sure how one can get the icon from the cursor handle...


    If you found any solutions, pls reply to this msg.


    thanks
    vinod

  2. 02 Jan 2003 at 08:57

    plz help me how to capture screen include cursor picture

  3. 02 Jan 2003 at 08:57

    Great but plz help me how to capture screen include cursor picture

  4. 29 Mar 2002 at 12:41

    I learn't alot about using API by trying this code.


    Pretty cool. works great!

  5. 01 Jan 1999 at 00:00

    This thread is for discussions of Magnifying The Desktop With Visual Basic.

Leave a comment

Sign in or Join us (it's free).

Mitchell Harper Visit http://www.devarticles.com for more articles and free programming eBooks, or visit Socket6.com for your dose of daily developer news!

Related discussion

Related podcasts

  • Christian Beauclair

    14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...

Want to stay in touch with what's going on? Follow us on twitter!