Hay que poner el WindowsState del form en Minimized
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim b As Bitmap = New Bitmap(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height, Imaging.PixelFormat.Format32bppArgb)
' Create a Graphics object that will process the screen shot
Dim gfx As Graphics = Graphics.FromImage(b)
' Copy the screen contents
gfx.CopyFromScreen(My.Computer.Screen.Bounds.X, My.Computer.Screen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy)
' Save the resulting graphics
b.Save("my2.jpg", Imaging.ImageFormat.Jpeg)
Me.BackgroundImage = b
Me.WindowState = FormWindowState.Maximized
End Sub
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario