Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Screendump to clipboard - reduce size - keep linear

Status
Not open for further replies.

ZOR

Technical User
Jan 30, 2002
2,963
0
0
GB
Probably the guns might come out posting this on this site. However I am trying to screen capture images of forms within a project. However when I use Photoshop etc, the fonts and liniarity? all go to pot, and its a lousey image. Any ideas how I can get sharper images? Thanks
 
i seen a couple good programs that have this on planet source code, have a look ( i would point you to a specific project but the site is down)

 
just press alt + prtscr to capture the current window. Then use word or something to create your document (I guess thats what your doing).
 
You should also see the PrintWindow function for capturing images.

The good thing about this function is that it can capture a window even if it is hidden behind other windows.
The bad thing is that it is not supported on Windows 98.
___
[tt]
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function PrintWindow Lib "user32" (ByVal hWnd As Long, ByVal hdcBlt As Long, ByVal nFlags As Long) As Long
Private Sub Form_Load()
Dim hWndCalc As Long
BackColor = vbWhite
AutoRedraw = True

'start calculator and find its window handle
Shell "calc.exe", vbNormalFocus
DoEvents
hWndCalc = FindWindow(vbNullString, "Calculator")

'Print the Calculator window image on the form
PrintWindow hWndCalc, hDC, 0
'Now the image of the window can be
'accessed using Me.Image picture object

'Print the image on printer as well
Printer.PaintPicture Me.Image, 0, 0
Printer.EndDoc
End Sub[/tt]
___

After drawing the captured image on a device context, you can save it to disk or print it. I tested the above code and found no distortion on captured or printed image.
 
>Any ideas how I can get sharper images?

Sure. Don't resize the image, and use a lossless image compression method (such as PNG rather than JPEG) to reduce the quantity of stored data
 
Many thanks for all the replies. Thanks Vbrit, yes I was doing an alt + prtscr, but resizing it to make it small for a web page made fonts etc illegible. Thanks Hypetia, I am on W98 and I am trying to find how others get there images so clear.
Thanks strongm, I downloaded a .BMP,Gif etc etc converter to PNG, but I think because I am starting with a screen to clipboard paste, its obviously a bad start maybe from screen resolution (might be talking from the back of my head). I tried then pasting it into the downloaded software, resized it, saved it as PNG, but it still looked lifeless. I will try doing it on different screen resolutions. Will be back if found a way. Thanks wrighty43, I will have a look on the site when it gets back up. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top