Solved

Saving a picture into gif format

Posted on 2003-12-04
4
191 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 50 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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month10 days, 9 hours left to enroll

631 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