A newsgroup article deals with the manifest user control issue. First the EXCERPTED ARTICLE, then the mods I stuck in the control:
First of all, please refer to
http://support.microsoft.com/default.aspx?scid=kb;en-us;309366
“Visual Basic 6.0 Does Not Support Windows XP Themes or Visual Styles”
To work around the problem, please use the following code.
Private Declare Sub InitCommonControls Lib "comctl32.dll" ()Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" _ (ByVal lpLibFileName As String) As LongPrivate Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule AsLong) As LongDim hMod As LongPrivate Sub Form_Initialize() hMod = LoadLibrary("shell32.dll") InitCommonControlsEnd SubPrivate Sub Form_Unload(Cancel As Integer) Call FreeLibrary(hMod)End SubIn the control I pretty much used the above code, but stuck the appropriate stuff in UserControl_Initialize and UserControl_Terminate. It worked – no longer do I crash after clicking an item and then exiting the test demo.
|
Updated the article on the site to add this information. |