i am now just going to teach you how to make a simple very small screen shot application in vb.net
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click
TextBox1.Enabled = False
Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Timer1.Tick
Dim snappit As String = 0
TextBox1.Text -= snappit + 1
If textbox1.text = 0 Then
"skimlinks-unlinked">Me.Hide()
End If
If TextBox1.text = -2 Then
Try
Dim screenshot As Size = New Size("skimlinks-unlinked">My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
Dim screengrab As New Bitmap("skimlinks-unlinked">My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
Dim g As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(screengrab)
g.CopyFromScreen(New Point(0, 0), New Point(0, 0), screenshot)
"skimlinks-unlinked">screengrab.Save("snap.jpg")
MsgBox("your screen has been snapped and the snap was saved", MsgBoxStyle.Information, "SuperScreenShot")
"skimlinks-unlinked">Me.Close()
Catch ex As Exception
MsgBox("sorry unable to snap your screen and save at the moment please try again later", MsgBoxStyle.Critical, "Warning!")
End Try
End If
End Sub
End Class
No comments:
Post a Comment