Toolbar Button Image problem

G

Guest

--I asked this question before. I am still stuc
I use XP style ico files in a image list. I set the image list to 32x32 and 16 bit color
The toolbar use this image list
Button images appear fine in VS.net designer but disappear when run it

I tried to put this into frmMain.

Public Shared Sub Main(
System.Windows.Forms.Application.EnableVisualStyles(
System.Windows.Forms.Application.Run(New frmMain
End Sub 'Mai

The imaged still invisible, AND it breaks the application when I open and close a MDI child form. The error say

An unhandled exception of type 'System.Runtime.InteropServices.SEHException' occurred in system.windows.forms.dl

Additional information: External component has thrown an exception

Any help

Fran
 
H

Herfried K. Wagner [MVP]

* "=?Utf-8?B?RnJhbmsgSg==?= said:
--I asked this question before. I am still stuck
I use XP style ico files in a image list. I set the image list to 32x32 and 16 bit color.
The toolbar use this image list.
Button images appear fine in VS.net designer but disappear when run it.

I tried to put this into frmMain.

Public Shared Sub Main()
System.Windows.Forms.Application.EnableVisualStyles()

Add 'Application.DoEvents()' here, maybe it helps.
 
G

Guest

Thanks and that solves part of the problem.
Now the only problem is the images is still invisible on menu buttons. Somehow, if I use old style button icon images, with less color, it's fine.

Any help?

Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top