It's a bit hard to see, but I'm getting error 91 when exiting my project (in the IDE) that has your tab control.
I've attached the offending project. Be sure to open with the PersistentDebugPrint.VBG file.
All I did to your NewTabCtl was to pull all the source files into one folder, remove any compatibility requirements, edit the NewTabCtl.vbp to remove the path specifications, and then include the project within the PersistentDebugPrint.VBG file. I also played around with a few of your properties from your properties window, but that's it.
To get it going, I just expanded the scope of your OERN that you already had. My changes to get it going:
Code:
On Error Resume Next
For c = 1 To mSubclassedControlsForPaintingHwnds.Count
iHwnd = mSubclassedControlsForPaintingHwnds(c)
DetachMessage Me, iHwnd, WM_PAINT
DetachMessage Me, iHwnd, WM_MOVE
Next c
Set mSubclassedControlsForPaintingHwnds = Nothing
For c = 1 To mSubclassedFramesHwnds.Count
iHwnd = mSubclassedFramesHwnds(c)
DetachMessage Me, iHwnd, WM_PRINTCLIENT
DetachMessage Me, iHwnd, WM_MOUSELEAVE
Next c
Set mSubclassedFramesHwnds = Nothing
For c = 1 To mSubclassedControlsForMoveHwnds.Count
iHwnd = mSubclassedControlsForMoveHwnds(c)
DetachMessage Me, iHwnd, WM_WINDOWPOSCHANGING
Next c
Set mSubclassedControlsForMoveHwnds = Nothing
mTabIconFontsEventsHandler.Release
Set mTabIconFontsEventsHandler = Nothing
If mHandIconHandle <> 0 Then
DestroyCursor mHandIconHandle
mHandIconHandle = 0
End If
On Error GoTo 0
All in the DoTerminate procedure within the ctlNewTabCtl.ctl file. Attached doesn't have this fix. It's your original code.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.