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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I set a form icon?

Status
Not open for further replies.
Jan 8, 2001
163
US
I appologize for asking a question about a seemingly simple task but I couldn't use the search and the MSDN library help didn't include this for some reason...

Does anyone know how to set the icon for a form? I thought I could just set the "icon" field to the .ico I wanted but when I do, I get an "invalid property" error. Is there something I need to do to make it work?

Thanks in advance,
CrystalVisualBOracle :)
 
All you have to do is set the icon property to a valid .ico file. Perhaps the .ico file is not an actual icon file? You can try clicking on the ellipsis and using one of the nbundled icons that come with VB and se if it works. if it does you know it is probably your .ico file.

Have a good one!
BK
 
i did this once for a form that i wanted to change the icon for depending on which routine called the form.

i had trouble setting the .icon property to a filename, aside from not wanting to clutter up things by installing icons.

my solution was to place the icons i wanted into an array of imageboxs w/ .visible=false

when the form was called i did a select case to see who called it and set
.icon=image1(whoCalledMe) there.

...hope this helps

wayne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top