473,830 Members | 2,199 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9348
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.ShowDi alog();
if (StateLogIn)
{
StateLogIn = false;
if (frmLogin.Dialo gResult == DialogResult.OK )
{
Application.Run (thisForm);
}
else
{
Application.Exi t();
}
}
else
{
if (frmLogin.Dialo gResult == DialogResult.OK )
{
thisForm.Visibl e = 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
2500
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 application, this login authenticates the user and sets the access rights. What is the best way to get to this user information (either as a datarow from the users table or as a user class object) application wide. I have custom user controls on windows...
1
1642
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 log in to a remote machine, the site works fine for me and I'm able to access the aspx pages with no problems. When others try to access the site, it asks them for there login ID, password and domain.
2
1928
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 minutes in the web.config. The application is a reporting tool and at times there are some long running queries which may take 5-6 minutes to run . when my application(site) is accessed by users, few users are getting the windows authentication...
9
2572
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 header frame and a main frame. When i enter the application, i see the login screen on the whole screen, but when the authentication expires, the login screen appears on both frames.
3
2453
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 is no common database UserID and password. Each time the user logs in, the DSN UserID and Password screen is displayed. It has three input box and they are
3
2038
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 I access my application from another machine (ipaddress/ mywebsite) a login screen will pop up. Everything is fine if I enter correct credentials but I would like users to be able to automaticaly login from within the network without the login...
16
3900
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 aspx page with the CreateUserWizard control. The user can fill his username, password etc .... My problem is: when an user fills everything and clicks on button "create an account", nothing happens (no error, but no user account created). I...
10
22383
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 progress of these tasks on a label on the SplashScreen form. Once this is completed ok, the splash screen should close and the login form should be displayed. A successful login closes that form and shows the main form.
4
1566
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
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10774
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10489
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10202
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7746
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5617
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.