"Rik Hemsley" <rik@rikkus.info> schrieb:
> I'm using a ListView in Details mode and have assigned an ImageList to it
> via its SmallImageList property.
>
> If I make a trivial change to the code of my application, and then run it,
> the images show up within the ListViewItems as expected.
Are you using 'Application.EnableVisualStyles' in your application? If you
do so, call 'Application.DoEvents' immediately after calling
'EnableVisualStyles'.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/
Rik Hemsley - 05 Jan 2005 14:18 GMT
> Are you using 'Application.EnableVisualStyles' in your application? If you
> do so, call 'Application.DoEvents' immediately after calling
> 'EnableVisualStyles'.
I already do that, but thanks anyway!
Rik
Rik Hemsley - 05 Jan 2005 14:24 GMT
> Are you using 'Application.EnableVisualStyles' in your application? If you
> do so, call 'Application.DoEvents' immediately after calling
> 'EnableVisualStyles'.
The DoEvents didn't fix it (I already had it) but getting rid of
EnableVisualStyles did.
Now my application looks completely out of place on XP and Server 2003
but at least it's functional!
Thanks for pointing me in the right direction.
Rik
Rik Hemsley - 05 Jan 2005 14:31 GMT
> The DoEvents didn't fix it (I already had it) but getting rid of
> EnableVisualStyles did.
For anyone who's had a similar problem: If you ensure that
EnableVisualStyles is _first_ in your Main(), then that fixes the
problem I had while still allowing the XP styling to work.
I think my problem was that I was showing a splash screen before calling
EnableVisualStyles.
Rik
Herfried K. Wagner [MVP] - 05 Jan 2005 16:31 GMT
"Rik Hemsley" <rik@rikkus.info> schrieb:
> I think my problem was that I was showing a splash screen before calling
> EnableVisualStyles.
Well, that would have been my next suggestion ;-).

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/