public ActionResult Capture(PrtScreen prt, string command) { if (command == "Save") { int screenWidth = Screen.GetBounds(new Point(0, 0)).Width; int screenHeight = Screen.GetBounds(new Point(0, 0)).Height; Bitmap bmpScreenShot = new Bitmap(1920, 1080); Graphics gfx = Graphics.FromImage((Image)bmpScreenShot); gfx.CopyFromScreen(0, 0, 0, 0, new Size(screenWidth, screenHeight)); bmpScreenShot.Save("d:\\example.jpg", ImageFormat.Png); } return View(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)