Results 1 to 3 of 3

Thread: Making a screen shot???

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2008
    Posts
    128

    Making a screen shot???



    How can i make a screen shot from my screen?
    than save it

    And maybe add it to a picture box?


    All help is welcome

  2. #2

  3. #3
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Re: Making a screen shot???

    Try this one. You can just pass to the function the path where you want the captured image to be saved.
    Code:
    Public Declare Sub keybd_event Lib "user32" ( _
                   ByVal bVk As Byte, _
                   ByVal bScan As Byte, _
                   ByVal dwFlags As Long, _
                   ByVal dwExtraInfo As Long)
                   
    Public Sub Capture_Desktop(ByVal strDestination As String)
        On Error Resume Next
        DoEvents
        
        'To get the Entire Screen:
        'Call keybd_event(vbKeySnapshot, 0, 0, 0)
        
        'To get the Active Window:
        'Call keybd_event(vbKeySnapshot, 1, 0, 0)
        
        Call keybd_event(vbKeySnapshot, 0, 0, 0) 'Get the screen and copy it to clipboard
        DoEvents 'let computer catch up
        SavePicture Clipboard.GetData(vbCFBitmap), strDestination ' saves the clipboard data to a BMP file
    End Sub
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

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