Frage

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!

War es hilfreich?

Lösung

Got it:

renderer = New VisualStyleRenderer("ExplorerBar", 0, 0)
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top