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

C#

 
AnswerRe: How to import "using system.data.oledb;" automatically - C Sharp 2005 Pin
Eddy Vluggen20-Aug-09 21:06
professionalEddy Vluggen20-Aug-09 21:06 
AnswerRe: How to import "using system.data.oledb;" automatically - C Sharp 2005 Pin
OriginalGriff20-Aug-09 21:18
mveOriginalGriff20-Aug-09 21:18 
AnswerRe: How to import "using system.data.oledb;" automatically - C Sharp 2005 Pin
PIEBALDconsult21-Aug-09 4:42
mvePIEBALDconsult21-Aug-09 4:42 
QuestionBHO Problem Pin
Jacobb Michael20-Aug-09 18:03
Jacobb Michael20-Aug-09 18:03 
Questionlooking for a pre-PostMessage check.. Pin
JakeRoberts20-Aug-09 13:45
JakeRoberts20-Aug-09 13:45 
QuestionIs there a terminal services friendly way of writing this code? Pin
JollyMansArt20-Aug-09 12:33
JollyMansArt20-Aug-09 12:33 
AnswerRe: Is there a terminal services friendly way of writing this code? Pin
Daniel Grunwald20-Aug-09 12:47
Daniel Grunwald20-Aug-09 12:47 
Questionthe proper way to make a login screen appear in the main class - Main() - program.cs Pin
Natural_Demon20-Aug-09 11:04
Natural_Demon20-Aug-09 11:04 
this code below, show first 1 screen and if you close 'login screen' the 'new Form1' gets created and shown.
static void Main()
{
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    Application.Run(new loginscreen.LoginScreen());
    Application.Run(new Form1());
}


the code below works fine, but i would like to know witch property of the 'login' class i need to detect if the login window has been closed and finalize the class and then open the main window of the application (new Form1).
static void Main()
{
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    loginscreen.LoginScreen login = new loginscreen.LoginScreen();
    login.Show();

    if(login. // need work here
    {
         Application.Run(new Form1());
    }
    else
    {
        // login failed after 3 attemps, close the whole app
        Application.Exit();
    }
}



how to detect or witch property of the login class tells me the login window is closed.

kind regards

Bad = knowing 2 much

AnswerRe: the proper way to make a login screen appear in the main class - Main() - program.cs Pin
CoderForEver20-Aug-09 11:21
CoderForEver20-Aug-09 11:21 
GeneralRe: the proper way to make a login screen appear in the main class - Main() - program.cs Pin
Natural_Demon20-Aug-09 12:15
Natural_Demon20-Aug-09 12:15 
AnswerRe: the proper way to make a login screen appear in the main class - Main() - program.cs Pin
PIEBALDconsult20-Aug-09 12:00
mvePIEBALDconsult20-Aug-09 12:00 
GeneralRe: the proper way to make a login screen appear in the main class - Main() - program.cs Pin
Natural_Demon20-Aug-09 12:25
Natural_Demon20-Aug-09 12:25 
GeneralRe: the proper way to make a login screen appear in the main class - Main() - program.cs Pin
PIEBALDconsult20-Aug-09 13:00
mvePIEBALDconsult20-Aug-09 13:00 
GeneralRe: the proper way to make a login screen appear in the main class - Main() - program.cs Pin
Natural_Demon20-Aug-09 13:58
Natural_Demon20-Aug-09 13:58 
GeneralRe: the proper way to make a login screen appear in the main class - Main() - program.cs Pin
Henry Minute20-Aug-09 14:15
Henry Minute20-Aug-09 14:15 
GeneralRe: the proper way to make a login screen appear in the main class - Main() - program.cs Pin
Natural_Demon20-Aug-09 14:36
Natural_Demon20-Aug-09 14:36 
GeneralRe: the proper way to make a login screen appear in the main class - Main() - program.cs Pin
Henry Minute20-Aug-09 14:47
Henry Minute20-Aug-09 14:47 
GeneralRe: the proper way to make a login screen appear in the main class - Main() - program.cs Pin
Luc Pattyn20-Aug-09 14:32
sitebuilderLuc Pattyn20-Aug-09 14:32 
GeneralRe: the proper way to make a login screen appear in the main class - Main() - program.cs Pin
Natural_Demon20-Aug-09 15:03
Natural_Demon20-Aug-09 15:03 
QuestionOpen a prog/firefox ever x sec! Pin
nhqlbaislwfiikqraqnm20-Aug-09 10:27
nhqlbaislwfiikqraqnm20-Aug-09 10:27 
AnswerRe: Open a prog/firefox ever x sec! Pin
EliottA20-Aug-09 10:36
EliottA20-Aug-09 10:36 
GeneralRe: Open a prog/firefox ever x sec! Pin
nhqlbaislwfiikqraqnm20-Aug-09 10:42
nhqlbaislwfiikqraqnm20-Aug-09 10:42 
AnswerRe: Open a prog/firefox ever x sec! Pin
PIEBALDconsult20-Aug-09 12:01
mvePIEBALDconsult20-Aug-09 12:01 
QuestionSending a connection to another computer in a PEER TO PEER network Pin
CoderForEver20-Aug-09 10:23
CoderForEver20-Aug-09 10:23 
AnswerRe: Sending a connection to another computer in a PEER TO PEER network Pin
EliottA20-Aug-09 10:37
EliottA20-Aug-09 10:37 

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.