private void TestRegionScreenshot() { using (var x = new Drawing.Capture(Drawing.CaptureMode.Region).GetScreenshot()) { if (x != null) { TestUpload(x.ToByteArray()); } } }
private void AddDropDownWindows(ToolStripMenuItem menuItem) { foreach (var item in WindowManager.GetOpenWindows()) { menuItem.DropDownItems.Add(item.Value, NativeMethodsManager.GetApplicationIconSmall(item.Key).ToBitmap(), delegate { using (var x = new Drawing.Capture(Drawing.CaptureMode.ActiveWindow).GetScreenshot(item.Key)) { TestUpload(x.ToByteArray()); } }); } }