Results 1 to 3 of 3

Thread: How to take a screenshot of the current PC? [sOLVEd]

  1. #1

    Thread Starter
    Fanatic Member scr0p's Avatar
    Join Date
    Oct 2002
    Location
    VA
    Posts
    720

    How to take a screenshot of the current PC? [sOLVEd]

    How would I take a screeny of my PC, Like prnt scrn?
    Last edited by scr0p; Nov 17th, 2002 at 01:56 PM.
    asdf

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    VB Code:
    1. Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, _
    2. ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
    3.  
    4. Private Const VK_SNAPSHOT = &H2C
    5.  
    6. 'Author: Dalin Nie (Edited by Matthew Gates)
    7. 'Origin: [url]http://www.vbcode.com/[/url]
    8. 'Purpose: This function capture the screen or the active window of your computer. Programmatically and save it to a .bmp file.
    9. 'VB version: VB 6,VB 5,VB 4/32
    10. 'Save Screen As Bitmap
    11. Private Function SaveScreen(ByVal theFile As String) As Boolean
    12. On Error Resume Next
    13.  
    14. 'To get the Entire Screen
    15. Call keybd_event(vbKeySnapshot, 1, 0, 0)
    16.  
    17. 'To get the Active Window
    18. 'Call keybd_event(vbKeySnapshot, 0, 0, 0)
    19.  
    20. SavePicture Clipboard.GetData(vbCFBitmap), theFile
    21.  
    22. SaveScreen = True
    23. Exit Function
    24. End Function
    25. 'Usage
    26. Call SaveScreen("C:\Windows\Desktop\shot1.bmp")

  3. #3

    Thread Starter
    Fanatic Member scr0p's Avatar
    Join Date
    Oct 2002
    Location
    VA
    Posts
    720
    Nevermind, I got it to take a screenshot of the full screen. Thanks, the commented out thing was supposed to be not commented.

    THANKS
    Last edited by scr0p; Nov 17th, 2002 at 01:57 PM.
    asdf

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width