Ron Kidd
asked on
Login Form in Seperate Project vb.net
Hello
I have a Login form in one Project and an Application as a Separate Project.
How do I make the Login form open the Form in the Application Project, Pass the Credentials then Close?
I need the Login form to be reshown at anytime to change the Logged in User.
I have tried Setting a Public Sub in the Application Project with the Credentials as Parameters and calling that sub from the Login From/Project.
That works except the Login Form remains on the Screen. If I close the Login form then the whole thing closes including the Application form.
If I hide the Login Form then how can I show it again to change Users? (It is in another Project)
Login Form Code
Application From Code
I have a Login form in one Project and an Application as a Separate Project.
How do I make the Login form open the Form in the Application Project, Pass the Credentials then Close?
I need the Login form to be reshown at anytime to change the Logged in User.
I have tried Setting a Public Sub in the Application Project with the Credentials as Parameters and calling that sub from the Login From/Project.
That works except the Login Form remains on the Screen. If I close the Login form then the whole thing closes including the Application form.
If I hide the Login Form then how can I show it again to change Users? (It is in another Project)
Login Form Code
Imports XYZBLL
Public Class LogInForm
Dim cutToLengthForm As New XYZ.CutToLength
Private Sub LoginButtonClicked(sender As Object, e As EventArgs) Handles Staff1Button.Click, Staff2Button.Click, Staff3Button.Click,
Staff4Button.Click, Staff5Button.Click, Staff6Button.Click
cutToLengthForm.NewCutToLength(sender.text, sender.tag)
End Sub
End Class
Application From Code
Imports XYZBLL
Public Class CutToLength
Public Sub NewCutToLength(ByVal staffName As String, ByVal staffID As Integer)
LoggedInStaffLabel.Text = staffName
LoggedInStaffLabel.Tag = staffID
Me.Show()
End Sub
End Class
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Simple and effective.
Thanks again