Using Icons

See AlsoDX0ME2

There are a number of ways you can use icons529QBG to enhance your Visual Basic applications.  First determine the name and location of the file that contains the icon you want to use.  You can view the Icon Library1NQWYI icons to determine file names and directory locations using Appendix B, "Icon Library," of the Programmer's Guide, or by using the IconWorks sample application included with Visual Basic.

You can do the following with icons:

         Display13Z8KW6 an icon on a form or in a picture box or image control during design time or run time.

         Assign a drag icon to be displayed when a control is dragged during run time by setting the control's DragIcon3G3M07O property.

         Assign an icon to a form to be displayed when the form is minimized during run time by setting the form's Icon2S1DMPP property.

         Assign an icon to a Visual Basic application  to be displayed in a Microsoft Windows program group by specifying the form whose icon is to be used in the Make EXE File dialog box7XBKUY.

 

Tips

         For a minimized form, an application in a Microsoft Windows program group, and a control being dragged, the graphic representation must be in icon (.ICO) format.

         You can view, modify, and create icons with the IconWorks sample application included in the \SAMPLES\ICONWRKS subdirectory of the main Visual Basic directory.

         Some pairs of the Icon Library icons can be used in tandem.  For example, the pair of icons below represent the same file cabinet with its bottom drawer open and closed.

       

         The unfilled parts of Icon Library icons are transparent.  This makes the background color of your control, form, or desktop visible.


See Also

Help:

Assigning an Icon to a Form42XO904

Displaying Graphics on a Form13Z8KW6

 

Programmer's Guide:

Chapter 15, "Creating Graphics for Applications"