Download SimpleScreenshotCapture.zip, last updated 27/08/2017 (28.55 KB)

Download
  • md5: d5feac405f75f196cbed10213fbb31bc
  • sha1: 4c93ad2973fc7edf65a36515a295d8d2846bad86
  • sha256: 5d05b91c2ce2699dd39bdba6660dfe834aefac64837f02acfa0568b46c146de5
// Capturing screenshots using C# and p/invoke
// http://www.cyotek.com/blog/capturing-screenshots-using-csharp-and-p-invoke
// Copyright © 2017 Cyotek Ltd. All Rights Reserved.

// This work is licensed under the Creative Commons Attribution 4.0 International License.
// To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

using System;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;

namespace Cyotek.Demo.SimpleScreenshotCapture
{
  internal partial class AboutDialog : Form
  {
    #region Constructors

    public AboutDialog()
    {
      this.InitializeComponent();
    }

    #endregion

    #region Methods

    protected override void OnLoad(EventArgs e)
    {
      FileVersionInfo versionInfo;
      Font font;

      versionInfo = FileVersionInfo.GetVersionInfo(typeof(MainForm).Assembly.Location);
      nameLabel.Text = versionInfo.ProductName;
      copyrightLabel.Text = versionInfo.LegalCopyright;

      font = SystemFonts.MessageBoxFont;
      this.Font = font;
      nameLabel.Font = new Font(font, FontStyle.Bold);

      base.OnLoad(e);
    }

    private void closeButton_Click(object sender, EventArgs e)
    {
      this.Close();
    }

    private void webLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
    {
      try
      {
        Process.Start("http://cyotek.com");
      }
      catch (Exception ex)
      {
        MessageBox.Show(ex.GetBaseException().Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
      }
    }

    #endregion
  }
}

Donate

Donate