DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  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

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links