VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Simple login form for a Windows application that checks the entered username and password against a

myshadow  (1 Submission)   Custom Controls/Forms/Menus   Visual Basic 3.0   Unknown Difficulty   Thu 25th December 2008   Mon 8th February 2021

Simple login form for a Windows application that checks the entered username and password against a list of usernames and passwords in a

API Declarations


' You must do the following for this to work:
' 1 - create a Windows Forms Application named "TryLoggingIn"
' 2 - create a login form.
' a - right click project name in solution explorer
' add|New Item|Login Form
' b- double click on empty portion of the form. Insert this code.
' 3 - rename Form1 to MainMenu
' 4 - Project|Properties on Application tab
' a- change shutdown mode to "when last form closes"
' b- change the startup form to LoginForm1
' 5 - Connect the database to the project. The database I attached (users.sdf)
' has a table named tblEmployees:
' Primary Key = UserID, int, no nulls, identity = true
' EmpLast mvarchar(30)
' EmpFirst mvarchar (30)
' EmpUserName, mvarchar (35), no nulls, must be unique
' EmpPassword, mvarchar (35), no nulls
' **** Remember to change the database's "Copy to Output" property to "Copy if Newer'
' 6 - create a query to select a specific EmpUserName
' a- double click on the dataset in the Solution Explorer Window to
' open the dataset explorer
' NOTE: you may have to drag the table from the Database Explorer to the
' dataset explorer.
' b- right click on "fill, GetData()" in the tableadapter section of the
' table you are going to add the query
' c- select "Add Query" -- wizard comes up
' d- select "Use SQL Statements", click "Next"
' e- select "SELECT which returns rows", click "Next"
' f- you will see a select table. click on "Query Builder"
' g- scroll down to EmpUserName. In the "filter" column, type: =@UserName
' h- click off the EmpUserName row. this will put a WHERE clause in your query.
' i- click 'OK'
' j- click 'Finish'. This will add a "GetDataBy" method, that uses a parameter

Rate Simple login form for a Windows application that checks the entered username and password against a (1(1 Vote))
Simple login form for a Windows application that checks the entered username and password against a.bas

Simple login form for a Windows application that checks the entered username and password against a Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters