- Yasaklandı
- #1
Öncelikle bir tane picturebox ekleyelim ve bir tanede button ekleyelim. PictureBoxu ekran fotoğrafı ne kadar boyutta olmasını istiyorsanız
okadar boyutta yapınız. PictureBox özelliklerinden SizeMode görüntüye göre ayarlayabilirsiniz tavsiyem : StrechImage
Sonra button şu kodu ekliyoruz:
[CODE title="Button kodu"] Bitmap foto = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
Graphics grafik = Graphics.FromImage(ekrangoruntusu);
grafik.CopyFromScreen(0, 0, 0, 0, new Size(ekrangoruntusu.Width, ekrangoruntusu.Height));
pictureBox1.Image = ekrangoruntusu;[/CODE]