Downloads:
Features:
- Take screenshots of your desktop automatically with timing
C# Source Code:
- Main.cs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
using System; using System.Drawing; using System.Drawing.Imaging; using System.Windows.Forms; namespace Screenshot_With_Timer { public partial class Main : Form { public int ti = 0; public int Token = 0; public static Bitmap BM = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); public Main() { InitializeComponent(); } private void Main_Load(object sender, EventArgs e) { Graphics GH = Graphics.FromImage(BM as Image); GH.CopyFromScreen(0, 0, 0, 0, BM.Size); } private void Main_FormClosing(object sender, FormClosingEventArgs e) { timer1.Stop(); } private void btnStart_Click(object sender, EventArgs e) { ti = Convert.ToInt32(txtTime.Text); timer1.Interval = ti * 1000; timer1.Start(); } private void btnStop_Click(object sender, EventArgs e) { btnStart.Enabled = true; Settings.Enabled = true; btnStart.Text = "Start"; timer1.Stop(); btnStop.Enabled = false; } private void btnSettings_Click(object sender, EventArgs e) { if (Settings.Text == "Settings") { timer1.Stop(); Form.ActiveForm.Width = 468; groupBox2.Enabled = true; btnStart.Enabled = false; btnStop.Enabled = false; Settings.Text = "Save"; } else if (Settings.Text == "Save") { if (txtPath.Text == "") { MessageBox.Show("Select path to save photos \nRecommended to be folder ! ", "Select Path ", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else if (txtTime.Text == "") { MessageBox.Show("Set a Time First ", "Set a Time ", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { Form.ActiveForm.Width = 241; groupBox2.Enabled = false; btnStart.Enabled = true; Settings.Text = "Settings"; } } } private void btnPath_Click(object sender, EventArgs e) { FolderBrowserDialog fbd = new FolderBrowserDialog(); if (fbd.ShowDialog() == DialogResult.OK) { txtPath.Text = fbd.SelectedPath + @"\"; } } private void timer1_Tick(object sender, EventArgs e) { btnStop.Enabled = true; btnStart.Enabled = false; Settings.Enabled = false; Graphics GH = Graphics.FromImage(BM as Image); GH.CopyFromScreen(0, 0, 0, 0, BM.Size); pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; pictureBox1.Image = BM; string t = Convert.ToString(DateTime.Now.Hour) + Convert.ToString(DateTime.Now.Minute) + Convert.ToString(DateTime.Now.Second); string d = DateTime.Now.ToString("ddMMyyyy"); pictureBox1.Image.Save(txtPath.Text + "2AWSS-" + groupBox1.Text + "(" + t + d + ").jpeg", ImageFormat.Jpeg); Token++; btnStart.Text = Convert.ToString(Token); if (Token == 9999) { btnStop.PerformClick(); } } } } |
Screenshots:
Similar Apps:
Unknown
Contact: