Colors of image in PictureBox
Posted on 1998-06-19
I have created some 256 color images which I have put into picturebox controls in my VB5 app. I created them with Paint Shop Pro and used the "standard palette" which I assume is the Windows standard palette. The pictures look fine until I load another app like Internet Explorer. Then the colors get all whacked out. Even after exiting Internet Explorer, the colors don't go back to normal. I have to restart the application to get them to go back.
This is only a problem when I have my display properties set to 256 colors, but most of our clients run at 256 so I have to figure this out.
I tried to do a PictureBox.Refresh but that didn't seem to help. I also turned on the AutoRedraw property but that didn't seem to have an effect. I have seen references in the help file to Palette and PaletteMode properties but I have never used these. What exactly do these do? Can they help my problem?
I don't mind if the colors of the app go wild while you are running another graphical program. But I was hoping that there was a way to get the colors to go back to normal when you switched back to our app, or at least when you closed the other app.
Any ideas would be appreciated.