473,322 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

how to create login screen in windows application + SQL

hi there

i'm new to c sharp and i would like to learn more about it and
design the first form LOGIN so that i put admin user and pasword
i tried everything with no luck so i come here to get some help from
you guys

thanks

Nov 13 '06 #1
1 9329
You can run your Logon form firt in Main event. Here is an example:

private static bool StateLogIn = true;
private static void Main()
{
// main form
MainForm thisForm = new MainForm();
// login form
Login frmLogin = new Login();
// show login form first, force user to logged on system
frmLogin.ShowDialog();
if (StateLogIn)
{
StateLogIn = false;
if (frmLogin.DialogResult == DialogResult.OK)
{
Application.Run(thisForm);
}
else
{
Application.Exit();
}
}
else
{
if (frmLogin.DialogResult == DialogResult.OK)
{
thisForm.Visible = true;
}
}
}

"NiGhTmArE" wrote:
hi there

i'm new to c sharp and i would like to learn more about it and
design the first form LOGIN so that i put admin user and pasword
i tried everything with no luck so i come here to get some help from
you guys

thanks

Nov 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Babu Mannaravalappil | last post by:
My Windows application (C#) has a login screen and a user table to handle user rights and accessibility. This is independant of the OS level user security. At the time of launching the...
1
by: George | last post by:
Hi. I've deployed a web application on a desktop computer running W2K and IIS. I'm using the desktop as a server. When I try to access the site, either from my development computer or if I...
2
by: raagz | last post by:
Hi, I am developing an intranet portal and i have used Windows Authentication. The application is hosted on a windows 2003 server with .NET Framework 1.1. I have set the session timeout to 20...
9
by: dana lees | last post by:
Hello, I am developing a C# asp.net application. I am using the authentication and authorization mechanism, which its timeout is set to 60 minutes. My application consists of 2 frames - a...
3
by: bala | last post by:
Hi Gurus The scenario A MS Access frontend application with Oracle Backend (Linked Tables). The Database UserID and password is not stored and each user has a unique UserID and password. There...
3
by: xke | last post by:
I have windows authentication mode enabled on my application. If I access the website with localhost/mywebsite I get logged in directly and LoginView control will display my account name. When...
16
by: Mich | last post by:
Hi, i'm building an web application for anonymous users. They can take a look in the website, nothing more. In order to perform other actions, the anonymous user must be logged. So i create an...
10
by: =?Utf-8?B?UmljaGFyZCBCeXNvdXRo?= | last post by:
Hi In my app I have a SplashScreen, a login form and a main form. On launching the app, I'd like to show the SplashScreen while reading config files and attempting a database connection. I show...
4
by: TJO | last post by:
Can someone advise about feasibility of passing user credentials to an asp.net 2.0 application using query string or other techniques? I want to avoid the login screen. Thank you.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.