I have five forms: frmMain, frmLogin, frmAdminMode, frmUserMode, frmUserMode, frmUserModeDeep
There are two main use-cases: admin mode and user mode.
Admin Mode: As the project starts it runs frmMain. Clicking a button stops the autologin (simple timer) and will invoke frmLogin (using .ShowDialog). The user is prompted for the users' ID number (four digits) and pass-code (again four digits). frmLogin will query a back-end database to authorise or reject the login attempt (this bit is all working fine) and then return control to frmMain. If the user is a valid admin frmMain will then invoke frmAdminMode.
frmMain -> frmLogin
User Mode: The project starts and runs frmMain. Once the timer expires it automatically hides frmMain and invokes frmUserMode. There is a button on frmUserMode that invokes frmLogin allowing users to log in with their credentials. Successful login takes then to frmUserModeDeep.
frmMain -> frmUserMode -> frmLogin
At present I am creating properties in the Login form and querying that form from frmMain
Private Sub buttonAdminLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buttonAdminLogin.Click Dim adminLogin As New frmLogin() adminLogin.ShowDialog() ... If Not adminLogin.ID = "" Then
EDIT: Somehow I submitted this before I was finished! I'm still working on it...
This post has been edited by lukas_: 06 March 2011 - 04:34 PM