Results 1 to 10 of 10
  1. #1
    /b/oss's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    13,651
    Reputation
    795
    Thanks
    3,547

    Talking screen capture program [TUT]



    timer1.code:
    [php]Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    Dim BackUpClipboard As String = My.Computer.Clipboard.GetText
    SendKeys.Send("{PRTSC}")
    PictureBox1.Image = My.Computer.Clipboard.GetImage
    End Sub[/php]

    form1.code:
    [php]Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Timer1.Start()
    End Sub[/php]

    or full source code:
    [php]Public Class Form1

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    Dim BackUpClipboard As String = My.Computer.Clipboard.GetText
    SendKeys.Send("{PRTSC}")
    PictureBox1.Image = My.Computer.Clipboard.GetImage
    End Sub

    Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click

    End Sub


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Timer1.Start()
    End Sub
    End Class[/php]



  2. The Following User Says Thank You to /b/oss For This Useful Post:

    highLIGHTED (06-07-2010)

  3. #2
    -Simply-Own-'s Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    CA Section
    Posts
    2,228
    Reputation
    11
    Thanks
    234
    My Mood
    Amazed
    Some Pictures Will Be Nice

    Need Help? With Anything? Add Me On Msn.
    simplyown123@hotmail.com



    Made By Me

    -----------------------------------------------------------------


  4. #3
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Hmm...Nextgen made an exact same tutorial. Better code:

    [php]Me.Hide()
    System.Threading.Thread.Sleep(1000)
    SendKeys.Send("{PRTSC}")
    PictureBox1.Image = My.Computer.Clipboard.GetImage
    Me.Show()[/php]

    ^^^^^ To avoid the form from capturing itself..

    Anyways, Thanks

  5. #4
    /b/oss's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    13,651
    Reputation
    795
    Thanks
    3,547
    Quote Originally Posted by FLAMESABER View Post
    Hmm...Nextgen made an exact same tutorial. Better code:

    [php]Me.Hide()
    System.Threading.Thread.Sleep(1000)
    SendKeys.Send("{PRTSC}")
    PictureBox1.Image = My.Computer.Clipboard.GetImage
    Me.Show()[/php]

    ^^^^^ To avoid the form from capturing itself..

    Anyways, Thanks
    yes no problem. im so bored :/

  6. #5
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    I made a tool with saving option for this long time ago.



  7. #6
    /b/oss's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    13,651
    Reputation
    795
    Thanks
    3,547
    Quote Originally Posted by Blubb1337 View Post
    I made a tool with saving option for this long time ago.
    well didn't know. and yes i should add saving option!

  8. #7
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Source of my screenshot taker(messy):

    Code:
    Public Class Form1
    
        Dim dt As String
        Dim name1 As String
    
        Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            
            bmp.Checked = My.Settings.bmp
            jpeg.Checked = My.Settings.jpeg
            gif.Checked = My.Settings.gif
            tiff.Checked = My.Settings.tiff
            png.Checked = My.Settings.png
    
            If My.Settings.path = "" Then
                My.Settings.path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
            End If
    
            TextBox1.Text = My.Settings.path
    
          
        End Sub
    
        Private Sub checkformat()
            If bmp.Checked = True Then
                PictureBox1.Image.Save(TextBox1.Text & "\" & name1 & ".bmp", Drawing.Imaging.ImageFormat.Bmp)
            ElseIf gif.Checked = True Then
                PictureBox1.Image.Save(TextBox1.Text & "\" & name1 & ".gif", Drawing.Imaging.ImageFormat.Gif)
            ElseIf png.Checked = True Then
                PictureBox1.Image.Save(TextBox1.Text & "\" & name1 & ".png", Drawing.Imaging.ImageFormat.Png)
            ElseIf tiff.Checked = True Then
                PictureBox1.Image.Save(TextBox1.Text & "\" & name1 & ".tiff", Drawing.Imaging.ImageFormat.Tiff)
            ElseIf jpeg.Checked = True Then
                PictureBox1.Image.Save(TextBox1.Text & "\" & name1 & ".jpeg", Drawing.Imaging.ImageFormat.Jpeg)
            End If
    
    
        End Sub
    
        Private Sub ss()
            My.Settings.Save()
            My.Settings.Reload()
        End Sub
    
        Private Sub bmp_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bmp.CheckedChanged
            My.Settings.bmp = bmp.Checked
            ss()
    
        End Sub
    
        Private Sub jpeg_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles jpeg.CheckedChanged
            My.Settings.jpeg = jpeg.Checked
            ss()
    
        End Sub
    
        Private Sub gif_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gif.CheckedChanged
            My.Settings.gif = gif.Checked
            ss()
    
        End Sub
    
        Private Sub png_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles png.CheckedChanged
            My.Settings.png = png.Checked
            ss()
    
        End Sub
    
        Private Sub tiff_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tiff.CheckedChanged
            My.Settings.tiff = tiff.Checked
            ss()
    
        End Sub
    
        Private Sub taskbar_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles taskbar.CheckedChanged
            My.Settings.taskbar = taskbar.Checked
    
            ss()
    
    
            If taskbar.Checked = True Then
                Me.ShowInTaskbar = True
            Else
                Me.ShowInTaskbar = False
            End If
    
        End Sub
    
    
        Private Sub hotkeys_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hotkeys.Tick
            dt = Date.Today & "  " & TimeOfDay
    
            Dim f8 As Boolean
            f8 = GetAsyncKeyState(Keys.F8)
    
    
    
            If f8 = True Then
    
                SendKeys.SendWait("{PRTSC}")
    
                Application.DoEvents()
    
                Try
                    PictureBox1.Image = My.Computer.Clipboard.GetImage
    
                    Application.DoEvents()
    
                    name1 = dt.Replace(":", ".")
    
    
                    checkformat()
                Catch
                    MsgBox(ErrorToString)
                End Try
            End If
    
        End Sub
    
        Private Sub ShowToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ShowToolStripMenuItem.Click
            Me.Show()
        End Sub
    
        Private Sub HideToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HideToolStripMenuItem.Click
            Me.Hide()
        End Sub
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim fbd As New FolderBrowserDialog
            fbd.ShowDialog()
    
            TextBox1.Text = fbd.SelectedPath
    
            My.Settings.path = TextBox1.Text
    
            ss()
    
        End Sub
    
        Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
            My.Settings.path = TextBox1.Text
    
            ss()
        End Sub
    
        Private Sub CloseToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CloseToolStripMenuItem.Click
            Me.Close()
        End Sub
    
        Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick
            Me.Show()
        End Sub
    End Class



  9. #8
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    Quote Originally Posted by Blubb1337 View Post
    Source of my screenshot taker(messy):

    Code:
    Public Class Form1
    
        Dim dt As String
        Dim name1 As String
    
        Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            
            bmp.Checked = My.Settings.bmp
            jpeg.Checked = My.Settings.jpeg
            gif.Checked = My.Settings.gif
            tiff.Checked = My.Settings.tiff
            png.Checked = My.Settings.png
    
            .........

    Nice source blubb
    -Rest in peace leechers-

    Your PM box is 100% full.

  10. #9
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    You forgot two crucial lines of code!

    [php]Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    Dim BackUpClipboard As String = My.Computer.Clipboard.GetText
    me.hide()
    SendKeys.Send("{PRTSC}")
    me.show()
    PictureBox1.Image = My.Computer.Clipboard.GetImage
    End Sub[/php]


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  11. #10
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Or... you can use Windows Media SDK.

    Good tutorial anyways.

Similar Threads

  1. Best Screen Capture Program?
    By Jailbroken671 in forum General
    Replies: 49
    Last Post: 04-20-2011, 09:40 PM
  2. [Tut + Source] Screen Capture VB08
    By stevethehacker in forum Visual Basic Programming
    Replies: 6
    Last Post: 11-11-2009, 07:57 AM
  3. Re: Screen Capture Program
    By Jimmy in forum Hardware & Software Support
    Replies: 6
    Last Post: 09-03-2009, 02:59 PM
  4. Screen Capture Tutorial
    By Pixie in forum Visual Basic Programming
    Replies: 0
    Last Post: 08-06-2009, 11:57 PM
  5. cross hair program tut
    By GG2GG in forum Programming Tutorial Requests
    Replies: 4
    Last Post: 03-05-2008, 01:20 PM