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 3214804
In Process

The Archive Base Latest Questions

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

I am using Visual Basic 2010 and I am makeing a simple login app

  • 0

I am using Visual Basic 2010 and I am makeing a simple login app it prompts you for a username and password if it gets it right I want to open a form then close the previus one but when I do me.close it ends the program and I can’t go on

I am positive its working because I get the right password and username ut I can’t close the first windows

I tried to hide it but when I do I cant close it and the program goes on without quiting and with a hidden form

I heard rumers that there is Sub that can control the x in the corner

if there is one that would probably solve my problem but I can’t find it heres the code for the login form

Public Class Main_Login
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If TextBox1.Text = "My Name" And TextBox2.Text = "mypassword" Then
            Contentsish.Show()
            Me.Hide()
            Label3.Hide()
        Else
            Label3.Show()
        End If
    End Sub
End Class

Then the Form if you enter the right login info

Public Class Contentsish
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Label1.Hide()
        Timer1.Stop()
    End Sub
End Class

how can I fix this problem?

  • 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-17T15:06:14+00:00Added an answer on May 17, 2026 at 3:06 pm

    Go into your project settings and set the application to close when the last form closes and not when the startup form closes.

    edit: I just checked some of my VB.Net 2k8 code. What I do is create a new instance of the “child” form, do any initialization that I need, call .Show() on it, and then call .Close() on the current form (Me.Close()). Probably not the best way to do things, but it works for me. This is with the project setting I described earlier set. This allows me to exit from the child form or “logout” if needed.

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

Sidebar

Related Questions

I'm trying to create a fairly simple macro in Word 2010 using Visual Basic.
I'm using Visual Basic 9 (VS2008) I want to create new Tabs as and
I'm using Visual Basic 2010 Express. I have a form that can be minimized.
For a solo developer using Visual Studio 2010 beta 2 is TFS Basic a
I'm using Visual Basic 9 (VS2008) and TagLib. The following code extracts the album
I need to write an error log to a XML file using Visual Basic
In Visual Basic, is there a performance difference when using the IIf function instead
I'm developing a Desktop Search Engine in Visual Basic 9 (VS2008) using Lucene.NET (v2.0).
I'm using Visual Basic 6 for a legacy project and it's been working fine.
I am using Microsoft Visual Studio Professional 2010. (Also SQL Management Studio for my

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.