Windows Develop Bookmark and Share   
 index > Windows Forms General > TaskDialog and visual styles
 

TaskDialog and visual styles

Hi,
I have a VB.NET application that runs from a Sub Main and then loads some Windows Forms. I need to show a TaskDialog in some cases before forms are loaded, but doing so I get an EntryPointNotFoundException on TaskDialog function. I read that the problem is due to the wrong comctl32.dll version loaded.

I already have Application.EnableVisualStyles() at the beginning of Sub Main, and I noticed that if a Form is loaded before TaskDialog is invoked it is shown correctly, but if it is invoked before loading any form, the EntryPointNotFoundExceptionis thrown.

Is there a neat way to force the program to load comctl32.dll v6 from the beginning?
BuzzLightyear  Wednesday, September 16, 2009 4:30 PM
Your program is already loading comctl32.dll version 6. It however comes from the side-by-side cache. Your P/Invoke declaration will load the wrong one, version 5 from c:\windows\system32. Solving this problem is very awkward, you will have to get the loaded DLL handle and use GetProcAddress().

Don't go there. Download the Vista Bridge, it support Task dialogs.

Hans Passant.
nobugz  Wednesday, September 16, 2009 7:57 PM
Your program is already loading comctl32.dll version 6. It however comes from the side-by-side cache. Your P/Invoke declaration will load the wrong one, version 5 from c:\windows\system32. Solving this problem is very awkward, you will have to get the loaded DLL handle and use GetProcAddress().

Don't go there. Download the Vista Bridge, it support Task dialogs.

Hans Passant.
nobugz  Wednesday, September 16, 2009 7:57 PM

You can use google to search for other answers

Custom Search

More Threads

• Control.Invoke does not return
• Picturebox draw using XOR
• Multimedia Programming : Customized Media Player
• Treeview Issues
• Change taskbar application backcolor?
• How to detect when a form gets activated/deactivated/closed/minimized etc
• NotifyIcon error : {"Balloon tip text must have a non-empty value."}
• How do I tell which Button is Clicked?
• vb.net and dx9 sdk
• FolderBrowserDialog: How to browse only "Entire Network"?