Hi,
Please try to explicitly dispose the docking manager and its associated controls when the modal window closes. Sometime a crash can occur by improper disposal of the DockingManager, which we believe is due to the inability of the .NET framework to dispose the windows hooks correctly when the control is disposed.
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Dim ienum As IEnumerator = Me.dockingManager1.Controls
Dim dockedctrls As ArrayList = New ArrayList()
Do While ienum.MoveNext()
dockedctrls.Add(ienum.Current)
Loop
For Each ctrl As Control In dockedctrls
Me.dockingManager1.SetEnableDocking(ctrl, False)
ctrl.Dispose()
Next ctrl
Me.dockingManager1.Dispose()
End Sub
Try this
modified sample and let me know if it helps. Thanks for your patience.
Thanks,
Vijay
>I downloaded and ran the sample application for changing Docked Tab colors. However when I ran it (debug mode, XP Pro Sp1) I get an exception on closing.
>
>Here is a sample from the error log:
>Event Type: Error
>Event Source: Application Error
>Event Category: None
>Event ID: 1000
>Date: 11/08/2005
>Time: 16:03:24
>User: N/A
>Computer: PROTEUS
>Description:
>Faulting application f25893_vbcoloredtabs.exe, version 1.0.2049.27048, faulting module kernel32.dll, version 5.1.2600.153, fault address 0x00039282.
>
>