troubleshooting Question

Login Form in Seperate Project

Avatar of p-plater
p-platerFlag for Australia asked on
Visual Basic.NET.NET Programming
2 Comments1 Solution89 ViewsLast Modified:

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
    End Sub
End Class
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros