Question

I am trying to port my VB6 code to .NET, but there is something that I just don't find:

In VB6 I said (pseudo-code)

OpenThemeData "ExplorerBar"

and then...

DrawThemeBackground Lib "UxTheme.dll" (ByVal hTheme As IntPtr, ByVal hdc As IntPtr, ByVal iPartId As Integer, ByVal iStateId As Integer, ByRef pRect As RECT, ByRef pClipRect As RECT) As Integer

Now with .NET I just don't find that background.

    Dim renderer As VisualStyleRenderer
    renderer = New VisualStyleRenderer(VisualStyleElement.ExplorerBar.NormalGroupBackground.Normal)

I think I tried all available under "ExplorerBar", but none gave me the same result as in VB6.

Thank you very much for the help!

Was it helpful?

Solution

Got it:

renderer = New VisualStyleRenderer("ExplorerBar", 0, 0)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top