Found only the answer, how to do it in an application with Windows Forms , here is this code:
Graphics graph = null; var bmp = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); graph = Graphics.FromImage(bmp); graph.CopyFromScreen(0, 0, 0, 0, bmp.Size); bmp.Save("filename"); But if you add it to the console application, then Graphics , Bitmap , Screenshot are not perceived (underlined by a red wavy line) . By adding
using System.Windows.Forms; I got rid of problems with Graphics and Bitmap , but the Screen in the second line is still not perceived by the program. How can I take a screenshot of the console application?
ΠΠ°ΠΊ ΠΌΠΎΠΆΠ½ΠΎ ΡΠ΄Π΅Π»Π°ΡΡ ΡΠΊΡΠΈΠ½ΡΠΎΡ Π² ΠΊΠΎΠ½ΡΠΎΠ»ΡΠ½ΠΎΠΌ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΈ?- Aqua