Results 1 to 4 of 4

Thread: ScreenShot

  1. #1

    Thread Starter
    Lively Member stever2003's Avatar
    Join Date
    Dec 2000
    Posts
    109
    How do I get my computer's screenshot and put it into a PictureBox control? Also, how can I save the screenshot with the GIF or JPEG format?

  2. #2
    Guest
    Code:
    Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, _
      ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
    
    Private Const VK_SNAPSHOT = &H2C
    
    
    Private Function SaveScreen(ByVal theFile As String) As Boolean
    On Error Resume Next
    
        'To get the Entire Screen
        Call keybd_event(VK_SNAPSHOT, 1, 0, 0)
    
        'To get the Active Window
        'Call keybd_event(VK_SNAPSHOT, 0, 0, 0)
    
        SavePicture Clipboard.GetData(vbCFBitmap), theFile
    
    SaveScreen = True
    Exit Function
    End Function
    
    
    Usage
    
    Call SaveScreen("C:\Windows\Desktop\screenshot1.bmp")

    Than after you save the picture, you can use the LoadPicture function to load it into the Picturebox.


    Code:
    Picture1.Picture = LoadPicture("C:\Windows\Desktop\screenshot1.bmp")

  3. #3

    Thread Starter
    Lively Member stever2003's Avatar
    Join Date
    Dec 2000
    Posts
    109
    Yeah I've seen that thread before but i'm wondering if i can put the screenshot directly into an PictureBox. Also, can I save it as a GIF or JPEG?

  4. #4
    Member
    Join Date
    Feb 2001
    Location
    Kerala, India
    Posts
    42
    If u wto convert bmp to jpg u need some dll (i think some were it available)
    GetHelp <-> LetHelp

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