try { string filenamewithpath = string.Empty; filenamewithpath = HostingEnvironment.ApplicationPhysicalPath + "Images/Annotations/" + username + "/" + filename; string newDirectory = HostingEnvironment.ApplicationPhysicalPath + "Images/Annotations/" + username; this.CreateDirectoryIfNotExists(newDirectory); System.Drawing.Bitmap myImage = new System.Drawing.Bitmap(100, 100); //myImage.GetThumbnailImage(100, 100, null, new IntPtr()); myImage = CaptureScreen.CaptureDesktopWithCursor(); //this is for getting screenshot. myImage.Save(filenamewithpath, System.Drawing.Imaging.ImageFormat.Png); System.Windows.Forms.MessageBox.Show("File Saved as " + filenamewithpath); } catch (Exception ex) { //this.ErrorLog(ex.Message); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)