Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7489619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:17:23+00:00 2026-05-29T15:17:23+00:00

I have a very generic login form created that allows a user to access

  • 0

I have a very generic login form created that allows a user to access a application. My problem is getting the log in form to close after the application form is loaded. I have described the specifics in the comments of the code. Any help would be greatly appreciated.

Public Class frmUserLogin
Inherits System.Windows.Forms.Form

Private pass As String
Private username As String
Private attempt As Integer = 0
Private Admin As String
Private Password As String

Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click

    username = "Admin"
    pass = "Password"

    If (txtUsername.Text = username) And (txtPassword.Text = pass) Then
        MsgBox("That is correct")
        frmApplicationWindow.Show()

        'I am trying to close the login form after the user is able to load the frmapplicationwindow

        'frmUserLogin.close() , when I use this it says I can use it because it is referring to the same instance of itself
        'me.close , when I use this it closes both the user login form and the application form

    Else
        MsgBox("wrong username or pass, try again")
        attempt += 1
    End If

    If attempt = 3 Then
        MsgBox("You have reached the allowed number of login attempts")
        Me.Close()
    End If
End Sub

End Class

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T15:17:26+00:00Added an answer on May 29, 2026 at 3:17 pm

    Just use Me.Hide in place of Me.Close.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have written a decorator that does something very generic. For example, it
i have very simple problem. I need to create model, that represent element of
We're trying to lock down a computer such that we have a generic login
We have very strange problem, one of our applications is continually querying server by
I have very long integer sequences that look like this (arbitrary length!): 0000000001110002220033333 Now
I have a Facebook iframe application that I am monetizing via Google Adsense. On
I have a very simple list of objects that represt people. Each object has
I have a client/server application written in C#/.NET 3.5 that I want to do
So basically what I have set up here is a very simple and generic
I have a very simple WPF application which displays a ComboBox which binds to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.