Results 1 to 7 of 7
  1. #1
    stevethehacker's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    USA bitch
    Posts
    416
    Reputation
    14
    Thanks
    51
    My Mood
    Bored

    [Tut + Source] Screen Capture VB08

    Here is a tutorial on how to make a screen capture. This program also allows you to save the picture to your computer.
    1. Open up a new project and add 2 buttons,Savefiledialog,and a picturebox
    2. Copy and paste
    3. Press Thanks
    Code:
    Public Class Form1
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim bounds As Rectangle
            Dim screenshot As System.Drawing.Bitmap
            Dim graph As Graphics
            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 = screenshot
        End Sub
    
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            Dim savefiledialog1 As New SaveFileDialog
            Try
                savefiledialog1.Title = "Save File"
                savefiledialog1.FileName = "*.bmp"
                savefiledialog1.Filter = "Bitmap |*.bmp"
                If savefiledialog1.ShowDialog() = DialogResult.OK Then
                    PictureBox1.Image.Save(savefiledialog1.FileName, System.Drawing.Imaging.ImageFormat.Bmp)
                End If
            Catch ex As Exception
    
            End Try
        End Sub
    
    End Class
    When your done it should look like this. The screenshot will be the full width and height of your desktop

    Here is download for the program
    VIrus scan
    Last edited by stevethehacker; 11-09-2009 at 05:33 PM.

  2. The Following 3 Users Say Thank You to stevethehacker For This Useful Post:

    James00Gauge (11-11-2009),Laxitive (11-10-2009),llaxman21 (11-10-2009)

  3. #2
    Laxitive's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    0
    cool. thx I was looking for 1 because none of the others work

  4. #3
    luongoo's Avatar
    Join Date
    Sep 2008
    Gender
    male
    Location
    N Korea
    Posts
    550
    Reputation
    3
    Thanks
    102
    My Mood
    Cynical
    i had one on my os simulator project :P pity how u cant make the preview smaller
    [img]https://www.danasof*****m/sig/MPGH373002.jpg[/img]
    3 years ago, I was hacking/playing Combat Arms thinking it was the best FPS ever made. Now, I own Black Ops, Modern Warfare 2, Bad Company 2 and Quantum of Solace. Every time I play COD, it all comes down to skill from Combat Arms.
    Quote Originally Posted by AVGN
    i read your sig,

    and its true, playing against SO many hackers in CA

    increases your skill against legit player in other games!
    Sure... Thats what i meant

    And when I play Combat Arms now, I play better because the other games have taught me to watch for campers
    Respect list: https://www.mpgh.net/forum/members/list/

  5. #4
    Threadstarter
    Dual-Keyboard Member
    stevethehacker's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    USA bitch
    Posts
    416
    Reputation
    14
    Thanks
    51
    My Mood
    Bored
    Quote Originally Posted by luongoo View Post
    i had one on my os simulator project :P pity how u cant make the preview smaller
    ya I couldnt find a way how to but it doesn't really matter

  6. #5
    XGelite's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Enter text here
    Posts
    1,344
    Reputation
    12
    Thanks
    276
    doesnt windows have one built in? "print screen" lol but thx anyways

  7. #6
    Threadstarter
    Dual-Keyboard Member
    stevethehacker's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    USA bitch
    Posts
    416
    Reputation
    14
    Thanks
    51
    My Mood
    Bored
    with hotkeys you could take multiple in a game and save them all and a lot of older computers don't have that button

  8. #7
    XGelite's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Enter text here
    Posts
    1,344
    Reputation
    12
    Thanks
    276
    most games now when you press printscreen it saves a different file everytime you press it.
    and everybody that has a computer has a print screen on the keyboard. that was a while ago that it wasn't mainstream. in fact i have a keyboard from when i used windows 95 that even has it. :P and nobody has that old of a computer anymore that plays games.

    but w/e, it helps beginners learn :P

Similar Threads

  1. screen capture program [TUT]
    By /b/oss in forum Visual Basic Programming
    Replies: 9
    Last Post: 06-07-2010, 10:46 AM
  2. Screen Capture Source Code
    By Pixie in forum Visual Basic Programming
    Replies: 0
    Last Post: 08-07-2009, 05:58 PM
  3. Any c# tuts, source codes, anything?!?!?!
    By t7ancients in forum C++/C Programming
    Replies: 5
    Last Post: 06-04-2009, 02:59 PM
  4. [PIC TuT] Login screen
    By m60 in forum Visual Basic Programming
    Replies: 2
    Last Post: 01-13-2009, 12:28 AM
  5. [TUT] Gray Screen saver on warrock
    By ktalin91 in forum WarRock Korea Hacks
    Replies: 0
    Last Post: 05-12-2007, 07:45 PM

Tags for this Thread