Hi,
I have created an application using VB6.0 which captures the print screen of
the desktop and saves it in a specified path, but the file size it creates is
3.75 MB, i want the application to create a JPG file with file size as not
more than 400 KB.
Below is the code:
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan
As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Dim savePath As String
Public Function ScreenShot(ByVal path$) As Boolean
Call keybd_event(vbKeySnapshot, 2, 0, 0) ' change to 1 for active window or
2 for whole screen
DoEvents
SavePicture Clipboard.GetData(vbCFBitmap), path$
ScreenShot = True
Exit Function
ScreenShot = False
End Function
Private Sub Command2_Click()
ScreenShot savePath ' type some path here
End Sub
Private Sub Command1_Click()
savePath = Text1.Text
Label1.Caption = savePath
End Sub
please help......
Archived from group: microsoft>public>vb>directx