I need to get the current state(Enabled or disabled) of a control through program. I am wondering how to do that?

Thanks for help