How can I tell if an icon (or anything else) in another program is enabled or disabled?

Thanks for reading this.....