VB6 Form Icons display as negatives

In my VB6 app I have one form that can be used for several things, and depending on what it's used for it changes its icon.
In the development environment this works fine, but when in a compiled and installed app the icons come out as negative versions of what they should, like a film negative with all the colours reversed (see attached picture)
I have tried:
Loading the icon from another form
Me.Icon = frmIcons.imgDefIcon(0).Picture
Loading the icon directly from the source file.
Me.Icon = LoadPicture("C:\Projects\Icons\16\user_16x16.ico")
Both cause the same problem. This only happens on the forms that change their icon, not on ones that keep the one specified at design time.
I load icons from other forms all the time, and this works fine in the IDE or on a compiled program, but it doesn't seem to work when it's settign the form icon, as opposed to an icon displayed somewhere else on the form.
Any thoughts?
Icon-Problem.bmp
Charlie_BarnardAsked:
Who is Participating?
 
c0ldfyr3Connect With a Mentor Commented:
Try adding the icons to an image list, i would imagine it's something to do with the fact that you're loading a 'picture' using both methods above and VB is doing a crappy job of converting it to an icon. If you add them to an imagelist and retrieve them from there it should save them as an icon and give your caller an icon instead of a bitmap which should fix your problem =) It's also a cleaner practice ;)
0
 
c0ldfyr3Commented:
Sorry just incase, the imagelist is a control contained in the 'Microsoft Common Controls 6' component. You can add and remove images by right clicking it and going to properties ;)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.