When Windows XP visual styles are enabled, if you use ShowDialog() on a form in response to an event raised by clicking on a NotifyIcon or a popup menu from a NotifyIcon, you get a SEHException when the form is closed.
Has anyone else noticed this If so, how do you work around it

EnableVisualStyles and NotifyIcon bug
atul_v
Icons in an imagelist generally look OK in toolbars,tabcontrols,buttons and just about any control that takes an ImageList and ImageIndex.
If you try to assign a 32bit image to a control such as label
i.e. myLabel.Image = myImageList.Images(0)
then that will usually end up with the alpha being flattened and shown as black or blue instead of semi transparent. This is an issue with Imagelist's and it should be fixed in VS2005.
With a little more info on how and where you are assigning the images, we may be able to come up with a solution.
sibot13
To make sure they loaded at the correct point, I removed (temporarily) the Application.DoEvents code and the icons still loaded into the imagelist.
Could this be something to do with only having the standard version of VB.Net
When I look at the icons (using windows explorer) within the new folder, the shadows appear as I expect, but when you open them in VS, the shadows show as the solid black lines
Any ideas
Thanks very much for all your help by the way, I really appreciate it.
Frank Loizzi
ms44cn
public static void Main()
{
Application.EnableVisualStyles();
Application.DoEvents();
Application.Run(...);
}
Charles G.-Marcil
Public Shared Sub Main()
Application.EnableVisualStyles()
Application.DoEvents()
Application.Run(New frmMain_Menu)
End Sub
double_detente
sana234
Would it be better to build the image list at run time rather than design time and is this a practice I should be getting used to
Thanks again for your help, it is much appreciated.
Mark.
Paul Martin
Are the icons stored in an ImageList with ColorDepth set to Depth32Bit
mcclurgj
PedroAntonio
Recycled Gardens
bronce32
Select the new folder and add the icons to it.
Set the BuildAction property of each icon to Embedded Resource.
Name the icons according to the index at which you want them to appear. (i.e. image01.ico , image02.ico, image03.ico)
Add the following code to Form_Load()
Dim assy As System.Reflection.Assembly = Me.GetType.Assembly
For Each resourceName As String In assy.GetManifestResourceNames
If resourceName.EndsWith("ico") Then
ImageList1.Images.Add(Image.FromStream(assy.GetManifestResourceStream(resourceName)))
End If
Next
Note that you can set the imageindex at designtime even though the imagelist contains no images.
It was not necessary to place the icons in a folder, but it helps to keep the solution explorer tidy.
SRavi
Syva
even there I have tried adding the suggested code within Module1 but to no avail, it doesn't like the syntax.
Public Sub Main()
Application.EnableVisualStyles()
Application.DoEvents()
Application.Run(frmMain_Menu)
End Sub
Help!!!!!!