Private Sub Capture_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Capture.Click
Dim w As New WebBrowser()
w.Size = New Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height)
w.Navigate("http://www.google.com.vn")
AddHandler w.DocumentCompleted, AddressOf CompletedDoc
End Sub
Private Sub CompletedDoc(ByVal sender As Object, ByVal e As WebBrowserDocumentCompletedEventArgs)
Dim w As WebBrowser = CType(sender, WebBrowser)
Dim b As New Bitmap(w.Document.Body.ScrollRectangle.Width, w.Document.Body.ScrollRectangle.Height)
w.DrawToBitmap(b, New Rectangle(0, 0, b.Width, b.Height))
b.Save("Your Image File Path Here", Drawing.Imaging.ImageFormat.Jpeg)
b.Dispose()
w.Dispose()
End Sub