?
Solved

Saving a picture into gif format

Posted on 2003-12-04
4
Medium Priority
?
192 Views
Last Modified: 2013-12-25
Does anyone know how to save a picture in a gif?
im using vb 5.

Details:

Get a screen shot
save it in gif format (256 colors)
open the picture in vb


only it :)

thx for the help.
0
Comment
Question by:S-L-D-
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 100 total points
ID: 9880584
http://www.vbcode.com/asp/showzip.asp?ZipFile=capbit.zip&theID=165
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=948&lngWId=1
http://www.vbcode.com/asp/showzip.asp?ZipFile=http%3A%2F%2Fsneaky900%2Ehomestead%2Ecom%2Ffiles%2FZoom%2Ezip&theID=3496
http://www.vbcode.com/asp/showzip.asp?ZipFile=http%3A%2F%2Fwww%2Evbcode%2Ecom%2Fcode%2Fscreenshot02262002%2Ezip&theID=6300
http://www.vbcode.com/asp/showsn.asp?theID=6017

These are all programs to capture the screen. Including the source-files.


run the code and press spacebar:

Option Explicit
Private Type POINTAPI
       x As Long
       y As Long
End Type
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetCursor Lib "user32" () As Long
Private Declare Function DrawIcon Lib "user32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal hIcon As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long

Dim hwndDW As Long
Dim dcDW As Long
Dim pt As POINTAPI
Private Sub Form_KeyPress(KeyAscii As Integer)
With Me
  If KeyAscii = 32 Then 'spacebar
     GetCursorPos pt
     BitBlt .hdc, 0, 0, .ScaleWidth, .ScaleHeight, dcDW, 0, 0, vbSrcCopy
     DrawIcon .hdc, pt.x, pt.y, GetCursor
  End If
End With
End Sub

Private Sub Form_Load()
hwndDW = GetDesktopWindow()
dcDW = GetWindowDC(hwndDW)

End Sub
0
 

Expert Comment

by:COOMET
ID: 9881819
0
 

Author Comment

by:S-L-D-
ID: 10020554
>How about the link below ?
>
>http://www.freevbcode.com/ShowCode.Asp?ID=3533

the program is so slow... any faster?

thx
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question