Visual C# 2008 Screen Capture

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
1,694
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 1, 2009

Visual C# 2008 Screen Capture -

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Screen_Capture
{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { try { this.Opacity = 0; Rectangle bounds = default(Rectangle); System.Drawing.Bitmap screenshot = default(System.Drawing.Bitmap); Graphics graph = default(Graphics); bounds = Screen.PrimaryScreen.Bounds; screenshot = new System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb); graph = Graphics.FromImage(screenshot); graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy); pictureBox1.Image = screenshot; this.Opacity = 100; SaveFileDialog savefiledialog1 = new SaveFileDialog(); savefiledialog1.Filter = "Bitmap (*.bmp*) |*.bmp|JPEG (*.jpg*) |*.jpg"; if (savefiledialog1.ShowDialog() == DialogResult.OK) { pictureBox1.Image.Save(savefiledialog1.FileName, System.Drawing.Imaging.ImageFormat.Bmp); } } catch (Exception ex) { } //Do Nothing } private void Form1_Load(object sender, EventArgs e) { } private void button2_Click(object sender, EventArgs e) { this.Close(); } }
}

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 8 dislikes

Link to this comment:

Share to:

Uploader Comments (Marobisoft)

  • ok. When i get the time i will remake this tut explaining each line. BTW i know lots about VB Code.

Top Comments

  • Stone that the foot of your toenail has been electrocuted by the forces of sausage man. Sausage man was born. He is inside hir and will unfortunately be hit by an aero plane in four thousand, seven hundred years. I, as a Streetman living on a dogs kennel. Cigarette man has put you under the copse of police man. I do not want your eyeball sockets with cornflakes, I want to plant the cat in the pumpkin.The dog approves of the delicious odor of your ear drum. Thank you for listening.

  • You fail to go over the code you silly script kiddy! looks like you need to learn programming conventions like naming controls, descriptive captions, and commenting code. Always represent the conventions no matter how simple the app is for they apply to all programming techniques and software

see all

All Comments (15)

Sign In or Sign Up now to post a comment!
  • How do you only capture part of the screen like the snip tool?

  • Your voice is super sexy and sweet. Your video is also good. I love u.

  • @LeftTechticle he's like 12 years old idiot.

  • bottom line, don't use code that you don't understand

  • Yeah, My bad I didn't know that you were being sarcastic I realize that now that I have reread it.

  • it was a reply to LeftTechticle's comment...and it doenst seem like u get that i was being sarcastic...

  • Though I do agree with you, it was a pretty poor demo he should go over each line and explain what it does and if he doesn't know what they do then learn well enough to explain it.

  • It is called a demo so get over it. He is just trying to help you guys out. If this was part of a much larger complex program then I can see it being a problem.

  • Those are automatically generated and this is just a demo therefore renaming it doesn't matter as much. So stop flipping out and get over it.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more