i've downloaded the SkyBound VisualStyle dll and have included it in my custom tabcontrol. the purpose is to enable the control to retain the default windows style even after i set the DrawMode to OwnerDrawFixed.

problem is after i added it into the control and set the SetVisualStyleEnhanced property to yes, my previous OnDrawItem still fires, but it seems to be overwritten by the SkyBound VisualStyle. anyway i can prevent this from happening? my main goal is to allow the SkyBound VisualStyle to first redraw the control in the default windows style, then only fire OnDrawItem to draw item on it.

some segments of the codes i used:

public TestTabControl()
            a = Assembly.GetExecutingAssembly();
            //set to ownerdrawfixed
            this.DrawMode = TabDrawMode.OwnerDrawFixed;
            //set style to default windows style
            visualStyleFilter1.SetVisualStyleEnhanced(this, Skybound.VisualStyles.VisualStyleEnhanced.Yes);
protected override void OnDrawItem(DrawItemEventArgs e)
...do stuff here...

any idea how i can do that?

9 Years
Discussion Span
Last Post by gp04lch

well, for those facing this same problem, i've found out that using SkyBound's freestyle fixes this problem, it allows you draw on top of the default theme draw using OnDrawItem.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.