I have made an application that can render and save a given element.
With windowElements
.Add("statusBar", _
VisualStyleElement.Window.CloseButton.Normal) 'need each element
End With
'calculate rect
Dim heightMinusFrame As Integer = _
ClientRectangle.Height - frameThickness
' Calculate the status bar rectangles and add them
' to the Dictionary of rectangles.
For Each entry In windowElements
SetRenderer(entry.Value)
elementRectangles("statusBar") = _
New Rectangle(0, 0, elemsize.Width, elemsize.Height)
Dim image = New Bitmap(elemsize.Width, elemsize.Height, PixelFormat.Format32bppArgb)
Dim gfx = Graphics.FromImage(image)
gfx.Clear(Color.Transparent)
renderer.DrawBackground(gfx, _
elementRectangles(entry.Key))
image.Save("btn.png")
Next entry
This works great except I have to specify which element I want, and I essentially want all of them. Is there some sort of for each that could iterate through all the possible elements?
Thanks