Save Screen Capture output to a file


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Save Screen Capture output to a file

  1. #1
    Ranger Guest

    Save Screen Capture output to a file


    Can anyone show me how to save a screen capture output into a file if my screen
    capture procedure is shown below ?
    'in module
    ----------------------------------------------------------------------
    Public Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal
    bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
    Public Const VK_SNAPSHOT As Byte = 44 ' PrintScreen virtual keycode
    Public Const PS_TheForm = 0
    Public Const PS_TheScreen As Byte = 1

    'in form
    ----------------------------------------------------------------------
    Private Sub Command1_Click()
    Clipboard.Clear
    ' Allow some time for Windows to clear the clipboard
    DoEvents

    ' Make Windows call the PrintScreen routine
    Call keybd_event(VK_SNAPSHOT, PS_TheScreen, 0, 0)

    ' Allow some time for Windows to update the clipboard
    DoEvents

    'Do something with the picture.
    Picture1.PaintPicture Clipboard.GetData, 0, 0
    End Sub

  2. #2
    Mattias Sjögren Guest

    Re: Save Screen Capture output to a file

    >Can anyone show me how to save a screen capture output into a file if my screen
    >capture procedure is shown below ?


    SavePicture Clipboard.GetData, "c:\screenshot.bmp"


    Matt

    ============================================
    Mattias Sjögren - mattiass @ hem.passagen.se
    CodeHound - Free VB Search Engine
    http://www.codehound.com

  3. #3
    Mattias Sjögren Guest

    Re: Save Screen Capture output to a file

    >Can anyone show me how to save a screen capture output into a file if my screen
    >capture procedure is shown below ?


    SavePicture Clipboard.GetData, "c:\screenshot.bmp"


    Matt

    ============================================
    Mattias Sjögren - mattiass @ hem.passagen.se
    CodeHound - Free VB Search Engine
    http://www.codehound.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center