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 WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; } private Bitmap Get_screen() { Size s = Screen.PrimaryScreen.Bounds.Size; Bitmap bt = new Bitmap(s.Width, s.Height); Graphics g = Graphics.FromImage(bt); g.CopyFromScreen(0, 0, 0, 0, s); return bt; } private void timer1_Tick(object sender, EventArgs e) { pictureBox1.Image=Get_screen(); } private void button1_Click(object sender, EventArgs e) { timer1.Enabled = true; } private void button2_Click(object sender, EventArgs e) { timer1.Enabled = false; } public void button3_Click(object sender, EventArgs e) { Bitmap c = new Bitmap(pictureBox1.Image); c.Save("C:\\image.gif", System.Drawing.Imaging.ImageFormat.Gif); } } }
public int B =1; private void button3_Click(object sender, EventArgs e) { Bitmap c = new Bitmap(pictureBox1.Image); c.Save("C:\\image" + B.ToString() + ".gif", System.Drawing.Imaging.ImageFormat.Gif); B ++; }
c.Save("C:\\image"+index.ToString()+".gif", System.....)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)