I would like to know how do I change the border color and border width of textbox as something shown below
If it is mouse hover I need to display one colour and on mouse down I need to display another colour.

Can anyone explain me the detailed process with the source if available.
You could do the following:
TextBoxinside aPanelFillThen, handle mouse events on the text box, switch the background color of the panel between your two colors, when the mouse enters/leaves.
This isn’t the most elegant approach in terms of using resources/handles but it should work without any custom drawing.