>I have thought of this but I have never seen a form manager class written that is not built into a framework. And I have never seen the ones that are in frameworks handle security on such a level as this. Do you know of any examples of a stand alone form manager class? Access to reports and some of the system screens must also pass through the same security object that is monitoring the forms.
It can be as simple as adding an array to the _screen object. Instead of the variable, assign the form to a member of this array:
oForm=SecurityCheck("FormClassHere")
if not isnull(oForm)
dime _screen.aForms[alen(_screen.aForms)+1]
_screen.aForms[alen(_screen.aForms)]=oForm
endif
Your SecurityCheck function should return a reference to the instantiated form, or null if access is denied.
OTOH, you can add a security check to the .init or .load of your forms class, and simply return .f. if access is denied. The form won't instantiate if its .load or .init return false.