C# da ekran görüntüsü yakalama, print screen işlemini c# ile gerçekleştirme ve kaydetme işlemlerini gerçekleştiren metot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | void EkranGoruntusuAl() { try { Rectangle rg = this.Bounds; grafik = new Bitmap(rg.Width, rg.Height); Graphics g = Graphics.FromImage(grafik as Image); g.CopyFromScreen(this.Location.X, this.Location.Y, 0, 0, rg.Size); EkranPanel.BackgroundImage = grafik; grafik.Save(Application.StartupPath.ToString() + "resim.jpg"); } catch(Exception hata) { } } |