I suppose with 'screen' you refer to a Dialog, right? In such case I would recommend you following articles:
Identify the active Dialogs and avoid race conditions.
Enumerate and search for existing Dialogs.
To determine the focus within a GUI component (also within a Dialog) just evaluate its property Focus. Please see the section Keyboard events and the focus path.
Concerning your second qeustion, you can of course implement generic interfaces. Your question, however, is very abstract to give you a concrete advise. The important aspect is, where you implement the code to determine the screen of interest? The above links address articles about diverse functions to find Dialogs existing in your application. These functions are available within the GUI application. If you intention is to call the functions from the 'outside' it will become difficult.
Anyway, although I don't understand your exact application I would recommend to implement the generic functionality within the Device Class or directly within the Application class. When you give me more details to the application case or you show me an example I can give you better recommendations.