I want to rotate 2 buttons similar to how you do it in powerpoint so that if the mouse goes over the button, it raises the mouseover event. I know how the event handler stuff works, but I have no idea how to rotate my button. Specifically, I want it to rotate about 15 degrees every half second on a timer.

Anyone know how to do this?

Edited 6 Years Ago by jayxx1234: n/a

I'm not seeing how this could be possible though out of curiosity, what's the goal of this?

I'll be honest I've never seen this type of 'animation' on a button before... that being said, does the physical BUTTON need to rotate? or just the 'visible' button component?

If the latter, perhaps a simple graphical overlay on the button which has an animated alternate graphic for when the mouseover hits it. Only drawback is, should you want the button to stay in the position it was in when the mouse leaves the mouseover then you're in a bit of trouble with that method.

Dunno what else to suggest to be honest, sorry.

Thanks for your posts. As far as I can tell, the easiest (and probably only) way to do what I want is to have another type of control that can rotate, and use it's mouseover event. anyone know any other controls that can be rotated in code?

Purpose of this is for me to learn more about c# and its capabilities. This project is a simple game.

This article has been dead for over six months. Start a new discussion instead.