Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
Hi, I have a toolbar that has buttons with images that are from an imagelist. They appear on the buttons when I run the application, but when I call EnableVisualStyle(), the images disappear. Not only the images on the toolbar disappear but also in a listview I'm using. Does any one know what causes this??

Proudly a Palestinian

Microsoft ASP.NET MVP

My Blog: wessamzeidan.net

Posted

Hey,

 

Are you using VS 1.1? If not, it will not work...

 

Furthermore, you also will have to use either XP Home, or XP Prof., or Win Server 2003...

 

If you are using all of the above, did you try to set the flat-style property to true, for all controls that have such a prop.?

 

If all of this is done, initiate the style with:

 

Application.EnableVisualStyles()

 

In the form initialize event.

 

Let me know if it still doesn't work...

IS
Posted
I'm using every thing you mentioned above, the problem is that if I don't initiate the style the images appear, but when I initiate it they disappear. And by the way, toolbars don't have the flat-style property, so I can't set it.

Proudly a Palestinian

Microsoft ASP.NET MVP

My Blog: wessamzeidan.net

Posted

WMZ,

 

Sorry, then I don't know the answer. And you are right, flat-style is not one of the options of a toolbar's button object, only Push-, Toggle-, and DropDownButton (plus seperator) are available.

 

I hope someone will be able to give you (and me) the answer.

 

Sorry again

IS

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...