문제

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!

도움이 되었습니까?

해결책

Got it:

renderer = New VisualStyleRenderer("ExplorerBar", 0, 0)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top