void ChartControl_MouseDoubleClick(object sender, MouseEventArgs e) { string fn = string.Empty; try { fn = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\" + Symbol + bl.Date()[bl.Last]+ ".png"; ScreenCapture sc = new ScreenCapture(); sc.CaptureWindowToFile(Handle, fn, System.Drawing.Imaging.ImageFormat.Png); } catch (Exception ex) { debug("Error writing: " + fn); debug(ex.Message + ex.StackTrace); } }
public bool TakeScreenShot(string fn) { try { ScreenCapture sc = new ScreenCapture(); sc.CaptureWindowToFile(Handle, fn, System.Drawing.Imaging.ImageFormat.Png); return true; } catch (Exception ex) { debug("Error writing: " + fn); debug(ex.Message + ex.StackTrace); } return false; }
private void Chart_MouseDoubleClick(object sender, MouseEventArgs e) { string s = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\" + Symbol + ".png"; ScreenCapture sc = new ScreenCapture(); sc.CaptureWindowToFile(Handle, s, System.Drawing.Imaging.ImageFormat.Png); }