Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleMake a tray icon that grabs an image of part of the desktop and saves it to the clipboard and/or a JPEG file on the desktop
DescriptionThis example shows how to make a tray icon that grabs an image of part of the desktop and saves it to the clipboard and/or a JPEG file on the desktop in Visual Basic 6.
Keywordsdesktop image, background, JPEG, JPG, try, system tray, clipboard
CategoriesGraphics, Windows
 
Thanks to Neil Crosby.

When it starts, this propgram displays an icon in the System Tray. When you left-click on the icon, the program grabs an image of the desktop and displays it. When you click and drag to select an area on the image, the program then uses Intel's JPEG library to save the image in a JPEG file on the desktop. See the code for details.

Right-click the icon and use the context menu to copy the image to the clipboard, to a JPEG file on the desktop, or both.

The zip file contains Microsoft's ITMalloc.tlb file. A reference to the ITMalloc.tlb must be made in the project file. (In VB6, it is under Project, References)

This program requires Intel's JPEG library, which you can download here.

Install the library and copy ijl15.dll into the Windows\System directory.

Because this program lives in the System Tray, it doesn't take up much room so it doesn't obscure much of the desktop.

 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated