Results 1 to 40 of 64

Thread: [RESOLVED] Screenshot-Help me

Threaded View

  1. #1

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Resolved [RESOLVED] Screenshot-Help me

    I want to get the whole screen in image control and then save it to my folder.
    Every thing is working fine except the image saved in the folder. Is there any problem in the following code? I also want that the image saved should be overwritten.

    vb Code:
    1. Private Sub Command1_Click()
    2. Timer1.Enabled = True
    3. Me.WindowState = vbMinimized
    4. End Sub
    5.  
    6. Private Sub Timer1_Timer()
    7. On Error GoTo errhandler
    8. Label1.Caption = Val(Label1.Caption) + 1
    9. For i = 1 To 10
    10.     Clipboard.Clear
    11.     keybd_event vbKeySnapshot, 0, 0, 0
    12.     DoEvents
    13.         Set Image1.Picture = Clipboard.GetData(vbCFBitmap)
    14.         SavePicture Image1.Picture, "C:\Documents and Settings\Vivek\My Documents\screenshots\image" & i & ".bmp"
    15.    
    16.      Next i
    17. errhandler:
    18.     MsgBox " completed"
    19.     Timer1.Enabled = False
    20. End Sub
    Last edited by vivek_master146; Jun 22nd, 2007 at 06:36 AM.
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

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