Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15214

PictureBox pictures mysteriously deleted

$
0
0
I have a number of PictureBoxes on my ShellBrowse UserControl, many there as fallback images for when ComCtl6 isn't present to enable fancy icons. Recently some of the older PictureBoxes had their images deleted. It apparently started a few weeks ago where the very oldest box lost its picture, then last week a bunch more vanished. I didn't notice at first because all the newer PictureBoxes still had their images intact, and I hadn't tested the control without ComCtl6 for a while. Even in an array of them, 0-5 were old and lost their images, 6-9 were newer and didn't.

I put them all back, and it saved and reloaded just fine, but I want to try to understand what could cause this. I hadn't even touched the control in design mode; hadn't added any new objects, hadn't changed any PictureBox contents, etc. All the changes were purely code.

The only major change between the last-good version (besides that single missing image from a while back) was when I implemented IOleInPlaceActiveObject code for arrow keys/tabbing; is there any way that could be related? But if it was some corruption, why was just the image targeted?

Possibly related is this issue I posted about earlier... sometimes I get a bunch of
Line 1016: Property DrawStyle in pbControlBox could not be set.
Line 1016: Property DrawWidth in pbControlBox could not be set.

errors. But only those two properties.

I checked the raw .ctl file and the Picture property had indeed been deleted; and it appears the data was deleted from the .ctx file as well; I don't know how to analyze that directly but the file size got smaller from the last good to first bad version, by the exact amount putting the pictures back in increased it.

The only thing suspicious about the cutoff between old and new is Picture3, which is an array, and the first still-intact box is a member of that array that has a different parent.

Any thoughts?

Viewing all articles
Browse latest Browse all 15214

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>