VB Ekran Görüntüsü Alma

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

x60

Seçkin Üye
Katılım
18 Kas 2015
Mesajlar
523
Tepki puanı
6
Yaş
101
10 HİZMET YILI
2 Button
1 PictureBox Ekliyorz

Button1 = ekran Görüntüsünü alma
Button2 = Kaydetme

Kodlar:



PHP:
Public Class Form1 

   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 
       Dim bounds As Rectangle 
       Dim screenshot As System.Drawing.Bitmap 
       Dim graph As Graphics 
       bounds = Screen.PrimaryScreen.Bounds 
       screenshot = 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 
   End Sub 

   Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 
       Dim savefiledialog1 As New SaveFileDialog 
       Try 
           savefiledialog1.Title = "Save File" 
           savefiledialog1.FileName = "*.bmp" 
           savefiledialog1.Filter = "Bitmap |*.bmp" 
           If savefiledialog1.ShowDialog() = DialogResult.OK Then 
               PictureBox1.Image.Save(savefiledialog1.FileName, System.Drawing.Imaging.ImageFormat.Bmp) 
           End If 
       Catch ex As Exception 

       End Try 
   End Sub 
End Class
 
  • Konuyu başlatan
  • Yasaklandı
  • #2

x60

Seçkin Üye
Katılım
18 Kas 2015
Mesajlar
523
Tepki puanı
6
Yaş
101
10 HİZMET YILI
Cvp: VB Ekran Görüntüsü Alma

Kodlar güncel +
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst