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 XYZBLLPublic 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 SubEnd Class
Imports XYZBLLPublic Class CutToLength Public Sub NewCutToLength(ByVal staffName As String, ByVal staffID As Integer) LoggedInStaffLabel.Text = staffName LoggedInStaffLabel.Tag = staffID Me.Show() End SubEnd Class
Simple and effective.
Thanks again