How to separate screenshot from copy on clipboard in C #

I have a problem here. I want to save screenshots to my desktop using the application that I am creating. To do this, I need to find out which images in the clipboard are in the screenshot and which images are copied. But I do not know how to do this, and I searched for the answer, but did not find it.

The idea of ​​the application is that it is always active in the background and that whenever I click the PrintScreen button, it directly saves the image on my desktop.

+3
source share
3 answers

Why don't you just make the app take a screenshot and save it for you?

, , , , - , .

bmp :

Size s = Screen.PrimaryScreen.Bounds.Size;
Bitmap bmp = new Bitmap(s.Width, s.Height);
Graphics g = Graphics.FromImage(bmp);
g.CopyFromScreen(0, 0, 0, 0, s);

BMP :

bmp.Save("PATHANDFILENAME");

, (, Tom). , , . .

+4

, , , , (2,2) RGB- (+ 3, + 2, + 1) - .

steganography.

+1
0

Source: https://habr.com/ru/post/1778751/


All Articles