Software Developer
Occupational Health Research
Have you also tried Greg's advice, and worked on your Login form? Since we are fighting the normal behavior of the SessionLock, working on your Login form could give you some flexibility to take care of actions.
That said, this isn't what I would recommend to handle the issue of unclosable locked forms. The session locking works the way it does for a reason, namely that users lower privileges should not be able to tamper with the work done by users of higher privileges (including discarding changes made by the administrator). That is why they have the different levels, to prevent one from having access to the other. As such, if you want to avoid the situation where an administrator logs out, and then a standard users logs in and can't close some open forms, I would recommend enforcing the administrator to save and close their work before logging out, rather than upping the permissions of the standard user to allow them access to explicitly denied forms or functions.
I am making sure that the first user has saved or reloaded all data that they are working on before they are logged out.
I've tried recalling LockSession in the afterSessionLock event and it just brings up the login form again.
I want to close the open forms without the second user even knowing they were open.
There are however times that another person will login with equivelant rights and they should be able to see all of the screens that were left open by the first user.
As always any help is appreciated Cory Cookson
public
{
_UserChanged = (_UserID !=
}
_UserID =
MicroFour.StrataFrame.UI.Windows.Forms.
bf.Close();
MicroFour.StrataFrame.Messaging.
bf.Save();
bf.Undo();