단일 윈도우의 스크린 샷 또는 전체 화면 적용하려면 아래의 방법을 사용할 수 있습니다 :
public void WindowsScreenshot()
{
// Full
Rectangle bounds = Screen.GetBounds(Point.Empty);
using (Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height))
{
using (Graphics g = Graphics.FromImage(bitmap))
{
g.CopyFromScreen(Point.Empty, Point.Empty, bounds.Size);
}
bitmap.Save("test_full.jpg", ImageFormat.Jpeg);
}
// Window
Rectangle bounds = this.Bounds;
using (Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height))
{
using (Graphics g = Graphics.FromImage(bitmap))
{
g.CopyFromScreen(new Point(bounds.Left, bounds.Top), Point.Empty, bounds.Size);
}
bitmap.Save("test_window.jpg", ImageFormat.Jpeg);
}
}
내가 너무 비슷 언어를 만들 수있는 능력에 박수를 영어. –
바지 란 무엇입니까? –
당신의 영어가 너를 이해하기에 너무 엉망이다. –