This is a little tutorial for people just starting to create themes for Visual Basic. I'll just be explaining MouseStates, and what you can do with them. If you don't know how to setup the start of a theme, just go grab AeonHacks theme base. Here

Alrighty, so let's get started.

First, make a new Sub, like this.
Sub Weary()
        SetColor("Button", Color.SkyBlue)
        SetColor("Text", Color.Black)
        SetColor("Border", Color.Black)
    End Sub
This will set the button main color to SkyBlue, the Text to black, and the Border to black. Well, it can be used for other things in the theme other then a button, but for the sake of the tutorial, let's go with that :P.

Second, go to your colorhook and input this.
       ButtonColor = GetColor("Button")
        TextColor = GetBrush("Text")
        Border = GetPen("Border")
Third, go to your PaintHook of whatever class you want to apply a MouseState to, and enter this.

Select case state
 Case MouseState.None

End Select
So between Case MousState.None & End Select, is where we will insert the code for how the button will look, when nothing is happening. Here's an example.

Select case state
 Case MouseState.None
    G.DrawRectangle(Border, Weary Rectangle(0, 0, Width - 1, Height - 1))
                DrawText(TextColor, HorizontalAlignment.Center, 0, 0)
End Select
The G.DrawRectangle bit, draws the button its-self with a border around it. The DrawText bit, draws the text centered in the middle of the button. You can change the position using the zero's at the end, the X, and the Y.

So that covers the button when nothing is happening, but now let's move on to when your mouse is hovering over the button.

So, it's basically the same thing, except this time the case is different.

  Case MouseState.Over
Then below Case MoustState.Over, add what you want the button to look like when it's being hovered over.

Tip: You can just C+P from the Case MouseState.None and change a few things and it will look nice.

Okay, so now let's move on to when the button is clicked.
   Case MouseState.Down
It's the same as the others, except it only appears when it's clicked.

This is a repost from my old account, I want control of this thread once again.

I've posted this on many sites under different handles. Variety, Weary, Sky, CuntPunter, CuntPuncher, and maybe a few more. But I wrote it originally for CodeLeakers.