msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to decrease the file size of .JPG file

 
Post new topic   Reply to topic    msvisual.com Forum Index -> DirectX
Author Message
File size of .JPG file



Joined: 12 Nov 2007
Posts: 1

PostPosted: Mon Nov 12, 2007 2:49 am    Post subject: How to decrease the file size of .JPG file Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Insert pic file based on a cell that has the file name. I want to write a macro that inserts pics based on cells that contains the file names. I have three fixed cells in all of my sheets, except "Cover" sheet, that contain the file names. Here is the recorded macro for two of the cells:

.X file save example Is somewhere a working example source in VB6 to save an 3d object (mesh) into an X file? Thanks, Aurelian

VB.NET help file for DirectX 9 Hi, all! Where can I find a VB.NET help file (.chm) for DirectX 9? In the "Doc" folder of the SDK, I finnd only a C++ help file that isn't very useful for me. :-) Thanks in advance, Thierry

Creating a 3D effect from an fx file Having trouble loading and effect from a file. Have tried looking for examples on the net but they are very hard to find and have even bought a few books. Unfortunately I'm trying to do it using Visual Basic 2005 beta and it seems to work differently. No

How to seek file in DirectSound 9 Hi All, I have programmed a directx 9 which plays and captures voice. What I would like to do is allow the user to rewind or forward 5 seconds at a time. I can see the position of the file with but how do I relate this value
Post new topic   Reply to topic    msvisual.com Forum Index -> DirectX All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group