I've followed the msdn article to create a webparts display modes menu. The articles shows you how to create a usercontrol to change display modes. Since I'm going to be using it in almost all the applications where webparts are used, I thought of converting the usercontrol into a custom control, which is what I did.
Its a simple control that displays a title, dropdownlist of available modes, and a linkbutton that resets the user changes.
You can download the dll and source from here