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()); } }); } }
private void picturePanel_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { Cursor.Current = Cursors.SizeAll; if (autoZoom) { NativeMethodsManager.ReleaseCapture(); NativeMethodsManager.SendMessage(Handle, 0xA1, 0x2, 0); } else { panelMouseDownLocation = new Point( this.PointToClient(Cursor.Position).X + picturePanel.HorizontalScroll.Value, this.PointToClient(Cursor.Position).Y + picturePanel.VerticalScroll.Value ); } } }