I am trying to close my programs login form after authenticating the user and pass, I have gotten it to open my new form and I have tried hiding the login form but that leaves the login thread running and I can imagine that will open some security vunerabilities after the login has validated the user.
Is their anyway to open this new form and kill the login thread without killing the whole program?
Me.Close() is closing the whole program so that is a problem. Any ideas?
7 replies to this topic
#1
Posted 02 January 2012 - 07:17 PM
|
|
|
#2
Posted 02 January 2012 - 10:44 PM
How about changing the shutdown mode of the program ?
#3
Posted 03 January 2012 - 07:01 AM
Changing the shutdown mode?
#4
Posted 03 January 2012 - 07:18 AM
I think this might help you: Shutdown mode
Not sure tho, but its almost the same question as you asked here.
Not sure tho, but its almost the same question as you asked here.
Think my post we're usefull? Please take your time and press the Like button at my post, Big Thanks!
For great C# & Android tutorials visit my blogg: http://www.thecompboy.com/
For great C# & Android tutorials visit my blogg: http://www.thecompboy.com/
#5
Posted 04 January 2012 - 09:06 AM
You can actually set the shutdown mode of the program in the project properties. Set your program to close when last form closes instead of the default - when startup form closes. Then you can call Me.Close() on your login form without closing the whole program.
#6
Posted 07 January 2012 - 02:35 PM
PERFECT! Thanks much! It was the shutdown modes I needed to change.
#7
Posted 10 January 2012 - 05:22 AM
Try This :
mainForm.Close()
Or
MainForm.Hide()
mainForm.Close()
Or
MainForm.Hide()
#8
Posted 25 January 2012 - 01:31 AM
Doing the above methods do work, but I'd highly recommend to set it up in the project view, rather than in code view. Check under your project settings and there should be a combobox which has the text "Shutdown when startup form closes". Change that to "Shutdown when last form closes".
~ blimp.
~ blimp.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









