-3

What should I use in C# windows forms to create a app to make screenshot like Yahoo Messenger does?

This is an example: enter image description here

How is that transparent cover made? A form?

user2985344
  • 71
  • 2
  • 2
  • 10
  • What do mean when you say `a screenshot app` I would suggest re-tuning this question before others start down marking / voting to close this non question – MethodMan Jan 25 '15 at 20:40

1 Answers1

0

First of all you need a global keyboard hook and check for the input of the printscreen key (prt sc)

Take a look at this: Global keyboard capture in C# application

Second thing is to take a screenshot of the whole screen.

    Size res = new Size(
    Screen.PrimaryScreen.Bounds.Width,
    Screen.PrimaryScreen.Bounds.Height
);
Point ptr = new Point(
    Screen.PrimaryScreen.Bounds.X,
    Screen.PrimaryScreen.Bounds.Y
);

using (var bmp = new Bitmap(res.Width, res.Height))
{
    using (var gfx = Graphics.FromImage(gmp))
    {
        gfx.CopyFromScreen(ptr.X, ptr.Y, 0, 0, bmp.Size, CopyPixelOperation.SourceCopy);
    }
}

Now all you have to is implement some way to crop the screenshot. This is not a spoonfeeding community, so the rest is up to you, besides you have to be more specific.

Community
  • 1
  • 1
Bauss
  • 2,767
  • 24
  • 28