0
Hello friends I am trying print strip in windows 10 it happens that the same tip with black screen, not taking print.I am using basic visual . 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
Here for me it worked, I just had to change the last line to
PictureBox1.Image = screenshot
.– Pedro Gaspar
In windows 10 screen gets black, ie the print comes out black, I await help thanks...
– ANTONIO MARCIO DA SILVA
My Windows is 10 too, and it just worked by changing that last line, as I said. What that function
Tela.RetornaImagemControle()
does? You don’t seem to be using the generated bitmap anywhere.– Pedro Gaspar