private void _entire_Click(object sender, EventArgs e) { _logger.Trace($"executing {nameof(_entire_Click)}..."); var img = User32.CaptureControl(_mwnd); Clipboard.SetImage(img); _mwnd.StatusMessageLeft = FormMainRes.Status_CapturedEntire; _logger.Trace($"completed {nameof(_entire_Click)}"); }
private void _active_Click(object sender, EventArgs e) { _logger.Trace($"executing {nameof(_active_Click)}..."); if (_mwnd.ActiveMdiChild == null) { _logger.Warn("there is no active MDI child window, cannot capture"); _logger.Warn("this error should not happen"); _mwnd.StatusMessageLeft = FormMainRes.Status_Ready; } else { var img = User32.CaptureControl(_mwnd.ActiveMdiChild); Clipboard.SetImage(img); _mwnd.StatusMessageLeft = string.Format(FormMainRes.Status_CapturedActive, _mwnd.ActiveMdiChild.Text); } _logger.Trace($"completed {nameof(_active_Click)}"); }