How to take screenshot in windows 10 with visual basic .net

0

Hello friends I'm trying to print print in windows 10 it happens the same hint with black screen, not taking print. I'm using visual basic .net

Public Sub printar ()

    Dim bounds As Rectangle
    Dim screenshot As System.Drawing.Bitmap
    Dim graph As Graphics

    System.Threading.Thread.Sleep(200)
    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 = Tela.RetornaImagemControle(TextBox2.Text, bounds)


End Sub
    
asked by anonymous 08.03.2018 / 02:04

0 answers