Make A Simple Magnifier

This article explains that how to make a magnifier in c#.

Introduction

You have a magnifier in your windows system. It is available at:

  1. C:\Windows\system32\Magnify.exe
    or
  2. Start > all programs > accessories > ease of access > magnifier

How to design it in C# Form Application

Here are some steps by using this you can design your own "Magnifier" in c#. Steps are as follows:

  1. Open Visual Studio.
  2. Then Click on File > New > Project or (Ctrl + Shift + N)

    Image-1.jpg

  3. Now select "Window Form Application" and give the name of the application

    Image-2.jpg

  4. Drag and Drop one "PictureBox" and one "Timer" on the form.
  5. Right click on "Timer" and Click on  "Properties"
  6. Enable the "Enabled" Property as "TRUE"

    Image-3.jpg

  7. Now On the Timers Tick event write the following code.
       

    Graphics g;

    Bitmap bmp;

    private void timer1_Tick(object sender, EventArgs e)

    {

         bmp = new Bitmap(250, 200);

         g = this.CreateGraphics();

         g = Graphics.FromImage(bmp);

         g.CopyFromScreen(MousePosition.X - 100, MousePosition.Y - 10, 0, 0, new Size(300, 300));

         pictureBox1.Image = bmp;


     

  8. Now Run This and See Output