C# 用windows服务来实现截屏?
发布网友
发布时间:2022-04-24 02:10
我来回答
共1个回答
热心网友
时间:2023-10-21 02:58
Bitmap bit = new Bitmap(this.Width,this.Height);
Graphics g = Graphics.FromImage(bit);
g.CopyFromScreen(this.Location, new Point(0, 0), bit.Size);
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "bmp|*.bmp|jpg|*.jpg|gif|*.gif";
if (saveFileDialog.ShowDialog() != DialogResult.Cancel)
{
bit.Save(saveFileDialog.FileName);
}
g.Dispose();
热心网友
时间:2023-10-21 02:58
Bitmap bit = new Bitmap(this.Width,this.Height);
Graphics g = Graphics.FromImage(bit);
g.CopyFromScreen(this.Location, new Point(0, 0), bit.Size);
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "bmp|*.bmp|jpg|*.jpg|gif|*.gif";
if (saveFileDialog.ShowDialog() != DialogResult.Cancel)
{
bit.Save(saveFileDialog.FileName);
}
g.Dispose();