Click here to Skip to main content
15,887,485 members
Home / Discussions / C#
   

C#

 
GeneralRe: Fill multiple comboboxes with identical information Pin
RobertSF27-Jan-22 8:47
professionalRobertSF27-Jan-22 8:47 
GeneralRe: Fill multiple comboboxes with identical information Pin
Gerry Schmitz27-Jan-22 17:28
mveGerry Schmitz27-Jan-22 17:28 
GeneralRe: Fill multiple comboboxes with identical information Pin
RobertSF28-Jan-22 8:01
professionalRobertSF28-Jan-22 8:01 
GeneralRe: Fill multiple comboboxes with identical information Pin
Gerry Schmitz28-Jan-22 8:44
mveGerry Schmitz28-Jan-22 8:44 
QuestionSecuring a Named Pipe Pin
Richard Andrew x6426-Jan-22 8:34
professionalRichard Andrew x6426-Jan-22 8:34 
AnswerRe: Securing a Named Pipe Pin
Luc Pattyn26-Jan-22 12:12
sitebuilderLuc Pattyn26-Jan-22 12:12 
GeneralRe: Securing a Named Pipe Pin
Richard Andrew x6427-Jan-22 7:06
professionalRichard Andrew x6427-Jan-22 7:06 
GeneralRe: Securing a Named Pipe Pin
Luc Pattyn27-Jan-22 7:11
sitebuilderLuc Pattyn27-Jan-22 7:11 
SuggestionRe: Securing a Named Pipe Pin
Randor 27-Jan-22 22:16
professional Randor 27-Jan-22 22:16 
GeneralRe: Securing a Named Pipe Pin
Richard Andrew x6428-Jan-22 3:58
professionalRichard Andrew x6428-Jan-22 3:58 
GeneralRe: Securing a Named Pipe Pin
Randor 28-Jan-22 9:32
professional Randor 28-Jan-22 9:32 
QuestionBest way to store/access data? Pin
Richard A Knox26-Jan-22 3:56
Richard A Knox26-Jan-22 3:56 
AnswerRe: Best way to store/access data? Pin
Richard MacCutchan26-Jan-22 4:39
mveRichard MacCutchan26-Jan-22 4:39 
QuestionRe: Best way to store/access data? Pin
Richard A Knox26-Jan-22 5:58
Richard A Knox26-Jan-22 5:58 
AnswerRe: Best way to store/access data? Pin
Richard MacCutchan26-Jan-22 6:09
mveRichard MacCutchan26-Jan-22 6:09 
AnswerRe: Best way to store/access data? Pin
OriginalGriff26-Jan-22 6:21
mveOriginalGriff26-Jan-22 6:21 
AnswerRe: Best way to store/access data? Pin
Gerry Schmitz26-Jan-22 6:39
mveGerry Schmitz26-Jan-22 6:39 
AnswerRe: Best way to store/access data? Pin
RobertSF26-Jan-22 7:56
professionalRobertSF26-Jan-22 7:56 
AnswerRe: Best way to store/access data? Pin
Mycroft Holmes26-Jan-22 11:39
professionalMycroft Holmes26-Jan-22 11:39 
AnswerRe: Best way to store/access data? Pin
jschell30-Jan-22 6:59
jschell30-Jan-22 6:59 
QuestionI need some help Pin
Member 1551267725-Jan-22 12:09
Member 1551267725-Jan-22 12:09 
AnswerRe: I need some help Pin
Luc Pattyn25-Jan-22 14:34
sitebuilderLuc Pattyn25-Jan-22 14:34 
AnswerRe: I need some help Pin
RobertSF25-Jan-22 17:15
professionalRobertSF25-Jan-22 17:15 
AnswerRe: I need some help Pin
OriginalGriff25-Jan-22 20:01
mveOriginalGriff25-Jan-22 20:01 
The problem is that Close will do just that: close the form - and since Form1 is almost certainly the "startup form" when it closes the system automatically closes the application which closes all forms and exits completely.

I'm just guessing here but it looks like you have a login screen or similar which you want to display, then close and remove when the user logs in. That isn't the way I'd do it - particularly since your current code appears to be adding controls and handlers to a different form, which is a bad idea.

Instead, make your "main display" the startup form, and in the Load event use ShowDialog to display the login form. When that exits, the code will continue from that point and you can add your controls to the current form if the login succeeded.

That way, forms don't need to "know" what each other is doing, and closing the main form terminates the app so you don't have to hassle with it!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

QuestionC# EPPlus How to hide range of columns Pin
Mou_kol24-Jan-22 2:01
Mou_kol24-Jan-22 2:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.