- Katılım
- 5 Ocak 2014
- Mesajlar
- 3,333
- Tepkime puanı
- 6
- Puanları
- 136
Merhaba arkadaşlar şimdi sizlere Vb.net ile Ekran Görüntüsü Almayı ve kaydede bileceğimiz bir program yapıcaz.
Lazım olanlar;
2
adet
buton
1
adet
pıcturebox
Butonların isimlerini "
Resim Çek
" ve
"Resmi Kaydet
" yapıyoruz.
Resim Çek
butonuna ekle
HTML-Kodu:
Dim bounds As RectangleDim screenshot As System.Drawing.BitmapDim graph As Graphicsbounds = Screen.PrimaryScreen.Boundsscreenshot = New System.Drawing.Bitmap(bounds.Width, bounds.Height,System.Drawing.Imaging.PixelFormat.Format32bppArgb)graph = Graphics.FromImage(screenshot)graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)PictureBox1.Image = screenshot
HTML-Kodu:
Dim bounds As RectangleDim screenshot As System.Drawing.BitmapDim graph As Graphicsbounds = Screen.PrimaryScreen.Boundsscreenshot = New System.Drawing.Bitmap(bounds.Width, bounds.Height,System.Drawing.Imaging.PixelFormat.Format32bppArgb)graph = Graphics.FromImage(screenshot)graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)PictureBox1.Image = screenshot
Kayıt Et
butonunun kodlarına
HTML-Kodu:
Dim savefiledialog1 As New SaveFileDialog Try savefiledialog1.Title = "Save File" savefiledialog1.FileName = "*.jpeg" savefiledialog1.Filter = "JPEG |*.jpeg" If savefiledialog1.ShowDialog() = DialogResult.OK Then PictureBox1.Image.Save(savefiledialog1.FileName, System.Drawing.Imaging.ImageFormat.Bmp) End If Catch ex As Exception 'Do Nothing End Try
HTML-Kodu:
Dim savefiledialog1 As New SaveFileDialog Try savefiledialog1.Title = "Save File" savefiledialog1.FileName = "*.jpeg" savefiledialog1.Filter = "JPEG |*.jpeg" If savefiledialog1.ShowDialog() = DialogResult.OK Then PictureBox1.Image.Save(savefiledialog1.FileName, System.Drawing.Imaging.ImageFormat.Bmp) End If Catch ex As Exception 'Do Nothing End Try