none
Please help fix my login form!!!

    Question

  •  

    I'm having lots of trouble perfecting this login form...I'm aware of what the issue is. I have a class and a button that are both named login. I've tried changing the button's name but whenever I do, I receive aproximately 30-40 errors.

     

    Here is the code for my form2.cs

     

    Code Block

    using System;

    using System.Collections.Generic;

    using System.ComponentModel;

    using System.Data;

    using System.Drawing;

    using System.Linq;

    using System.Text;

    using System.Windows.Forms;

    namespace Desktop_Window

    {

    public partial class Form2 : Form

    {

    public Form2()

    {

    InitializeComponent();

    }

    private void Form2_Load(object sender, EventArgs e)

    {

    }

    public class Login : System.Windows.Forms.Form

    {

    private int iCount; // this integer is declared to help count the number of times a user tried to login.

     

     

    private Form3 frmForm3 = new Form3(); // this line declares a variable that will point the user to the Main Screen upon a successful login. The second form created is called MainScreen.cs

     

    }

    private void Enter_Click(object sender, EventArgs e)

    {

    //The connection string is used to describe the type of database, the security information and the location to the database. Use a Sql Connection string if you are using SqlServer

    string ConString = "Provider=Microsoft.Jet.OLEDB.4.0;Password=\"\";User ID=Admin;Data Source=\"databasename.mdb\";";

     

     

    //Create a new connection object and assign the ConString Connection String above

    OleDb.OleDbConnection DBCon = new OleDb.OleDbConnection(ConString);

     

     

    g_Login = this.txtUsername.Text;

    string strPassword = this.txtPassword.Text;

     

     

    if (g_Login == "" | strPassword == "")

    {

    MessageBox.Show("You are missing information. Please make sure that both the username and password fields are filled out.", "Missing Info");

    this.txtUsername.Focus();

    return;

    }

     

     

    // The database has two fields in the Users table. A UserID field, which is the primary key and declared as a text. The other field is Password, which is a text as well.

    string strsql = "SELECT [UserID], [Password] FROM Users WHERE [UserID]='" + g_login + "' ";

    OleDb.OleDbCommand cm = new OleDb.OleDbCommand(strsql, DBCon);

    OleDb.OleDbDataReader dr = null;

    bool valid = false;

    bool HasRows = false;

    try

    {

    DBCon.Open();

    dr = cm.ExecuteReader();

    if (dr.HasRows)

    {

    while (dr.Read())

    {

    if (strPassword == dr["Password"])

    {

    valid = true;

    }

    }

    HasRows = true;

    }

    dr.Close();

    }

    catch (OleDb.OleDbException exO)

    {

    MessageBox.Show(exO.Message);

    }

    catch (Exception ex)

    {

    MessageBox.Show(ex.Message);

    }

    finally

    {

    if (DBCon.State == ConnectionState.Open)

    {

    DBCon.Close();

    }

    cm = null;

    dr = null;

    DBCon.Dispose();

    GC.Collect();

    }

    iCount = iCount + 1;

    if (valid == true)

    {

    this.Hide();

    frmMain.Show();

    }

    else if (iCount == 3)

    {

    MessageBox.Show("Contact Safreak!", "Invalid Info");

    this.Close();

    }

    else if (HasRows == false)

    {

    MessageBox.Show("Invalid user name, try again!", "Invalid Info");

    this.txtUsername.Focus();

    this.txtUsername.Text = "";

    this.txtPassword.Text = "";

    }

    else

    {

    MessageBox.Show("Invalid password, try again!", "Invalid Info");

    this.txtPassword.Focus();

    this.txtPassword.Text = "";

    }

    }

    }

    }

     

     

     

     

     

    Also here is my form2.designer.cs code

     

    Code Block

    namespace Desktop_Window

    {

    partial class Form2

    {

    /// <summary>

    /// Required designer variable.

    /// </summary>

    private System.ComponentModel.IContainer components = null;

    /// <summary>

    /// Clean up any resources being used.

    /// </summary>

    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>

    protected override void Dispose(bool disposing)

    {

    if (disposing && (components != null))

    {

    components.Dispose();

    }

    base.Dispose(disposing);

    }

    #region Windows Form Designer generated code

    /// <summary>

    /// Required method for Designer support - do not modify

    /// the contents of this method with the code editor.

    /// </summary>

    private void InitializeComponent()

    {

    this.Username = new System.Windows.Forms.TextBox();

    this.Password = new System.Windows.Forms.TextBox();

    this.Enter = new System.Windows.Forms.Button();

    this.SuspendLayout();

    //

    // Username

    //

    this.Username.Location = new System.Drawing.Point(109, 78);

    this.Username.Name = "Username";

    this.Username.Size = new System.Drawing.Size(199, 20);

    this.Username.TabIndex = 0;

    //

    // Password

    //

    this.Password.Location = new System.Drawing.Point(112, 143);

    this.Password.Name = "Password";

    this.Password.Size = new System.Drawing.Size(218, 20);

    this.Password.TabIndex = 1;

    //

    // Enter

    //

    this.Enter.Location = new System.Drawing.Point(348, 187);

    this.Enter.Name = "Enter";

    this.Enter.Size = new System.Drawing.Size(96, 54);

    this.Enter.TabIndex = 2;

    this.Enter.Text = "Login";

    this.Enter.UseVisualStyleBackColor = true;

    this.Enter.Click += new System.EventHandler(this.Enter_Click_1);

    //

    // Form2

    //

    this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

    this.ClientSize = new System.Drawing.Size(665, 482);

    this.Controls.Add(this.Enter);

    this.Controls.Add(this.Password);

    this.Controls.Add(this.Username);

    this.Name = "Form2";

    this.Text = "Form2";

    this.Load += new System.EventHandler(this.Form2_Load);

    this.ResumeLayout(false);

    this.PerformLayout();

    }

    #endregion

    private System.Windows.Forms.TextBox Username;

    private System.Windows.Forms.TextBox Password;

    private System.Windows.Forms.Button Enter;

    }

    }

     

     

    Tuesday, December 18, 2007 6:23 AM

Answers

  • Ok, first of all, your text boxes are named 'Username' and 'Password', not txtUsername and txtPassword. What is frMain? You have undefined variables of type string and int - g_Login and iCount. Also, you spelled g_Login as 'g_login' in one place. I am assuming that frMain is another form in your project. You need to create an instance of it before you can call .Show() method on it. Not really sure where Login class is used...

     

    Code:

    Code Block

    using System;

    using System.Collections.Generic;

    using System.ComponentModel;

    using System.Data;

    using System.Drawing;

    using System.Linq;

    using System.Text;

    using System.Windows.Forms;

    namespace Desktop_Window

    {

    public partial class Form2 : Form

    {

    public Form2()

    {

    InitializeComponent();

    }

    private void Form2_Load(object sender, EventArgs e)

    {

    }

    public class Login : System.Windows.Forms.Form

    {

    private int iCount; // this integer is declared to help count the number of times a user tried to login.

     

     

     

     

    private Form3 frmForm3 = new Form3(); // this line declares a variable that will point the user to the Main Screen upon a successful login. The second form created is called MainScreen.cs

     

     

    }

    private void Enter_Click(object sender, EventArgs e)

    {

    //The connection string is used to describe the type of database, the security information and the location to the database. Use a Sql Connection string if you are using SqlServer

    string ConString = "Provider=Microsoft.Jet.OLEDB.4.0;Password=\"\";User ID=Admin;Data Source=\"databasename.mdb\";";

     

     

     

     

    //Create a new connection object and assign the ConString Connection String above

    System.Data.OleDb.OleDbConnection DBCon = new System.Data.OleDb.OleDbConnection(ConString);

     

     

     

     

    string g_Login = this.txtUsername.Text;

    string strPassword = this.txtPassword.Text;

     

     

     

     

    if (g_Login == "" | strPassword == "")

    {

    MessageBox.Show("You are missing information. Please make sure that both the username and password fields are filled out.", "Missing Info");

    this.txtUsername.Focus();

    return;

    }

     

     

     

     

    // The database has two fields in the Users table. A UserID field, which is the primary key and declared as a text. The other field is Password, which is a text as well.

    string strsql = "SELECT [UserID], [Password] FROM Users WHERE [UserID]='" + g_Login + "' ";

    System.Data.OleDb.OleDbCommand cm = new System.Data.OleDb.OleDbCommand(strsql, DBCon);

    System.Data.OleDb.OleDbDataReader dr = null;

    bool valid = false;

    bool HasRows = false;

    int iCount = 0;

    try

    {

    DBCon.Open();

    dr = cm.ExecuteReader();

    if (dr.HasRows)

    {

    while (dr.Read())

    {

    if (strPassword == dr["Password"].ToString())

    {

    valid = true;

    }

    }

    HasRows = true;

    }

    dr.Close();

    }

    catch (System.Data.OleDb.OleDbException exO)

    {

    MessageBox.Show(exO.Message);

    }

    catch (Exception ex)

    {

    MessageBox.Show(ex.Message);

    }

    finally

    {

    if (DBCon.State == ConnectionState.Open)

    {

    DBCon.Close();

    }

    cm = null;

    dr = null;

    DBCon.Dispose();

    GC.Collect();

    }

    iCount = iCount + 1;

    if (valid == true)

    {

    this.Hide();

    frmMain main = new frmMain();

    main.Show();

    }

    else if (iCount == 3)

    {

    MessageBox.Show("Contact Safreak!", "Invalid Info");

    this.Close();

    }

    else if (HasRows == false)

    {

    MessageBox.Show("Invalid user name, try again!", "Invalid Info");

    this.txtUsername.Focus();

    this.txtUsername.Text = "";

    this.txtPassword.Text = "";

    }

    else

    {

    MessageBox.Show("Invalid password, try again!", "Invalid Info");

    this.txtPassword.Focus();

    this.txtPassword.Text = "";

    }

     

    }

    }

    }

     

     

     

    Designer code:

     

    Code Block

    namespace Desktop_Window

    {

    partial class Form2

    {

    /// <summary>

    /// Required designer variable.

    /// </summary>

    private System.ComponentModel.IContainer components = null;

    /// <summary>

    /// Clean up any resources being used.

    /// </summary>

    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>

    protected override void Dispose(bool disposing)

    {

    if (disposing && (components != null))

    {

    components.Dispose();

    }

    base.Dispose(disposing);

    }

    #region Windows Form Designer generated code

    /// <summary>

    /// Required method for Designer support - do not modify

    /// the contents of this method with the code editor.

    /// </summary>

    private void InitializeComponent()

    {

    this.txtUsername = new System.Windows.Forms.TextBox();

    this.txtPassword = new System.Windows.Forms.TextBox();

    this.Enter = new System.Windows.Forms.Button();

    this.SuspendLayout();

    //

    // txtUsername

    //

    this.txtUsername.Location = new System.Drawing.Point(109, 78);

    this.txtUsername.Name = "txtUsername";

    this.txtUsername.Size = new System.Drawing.Size(199, 20);

    this.txtUsername.TabIndex = 0;

    //

    // txtPassword

    //

    this.txtPassword.Location = new System.Drawing.Point(112, 143);

    this.txtPassword.Name = "txtPassword";

    this.txtPassword.Size = new System.Drawing.Size(218, 20);

    this.txtPassword.TabIndex = 1;

    //

    // Enter

    //

    this.Enter.Location = new System.Drawing.Point(348, 187);

    this.Enter.Name = "Enter";

    this.Enter.Size = new System.Drawing.Size(96, 54);

    this.Enter.TabIndex = 2;

    this.Enter.Text = "Login";

    this.Enter.UseVisualStyleBackColor = true;

    //

    // Form2

    //

    this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

    this.ClientSize = new System.Drawing.Size(665, 482);

    this.Controls.Add(this.Enter);

    this.Controls.Add(this.txtPassword);

    this.Controls.Add(this.txtUsername);

    this.Name = "Form2";

    this.Text = "Form2";

    this.Load += new System.EventHandler(this.Form2_Load);

    this.ResumeLayout(false);

    this.PerformLayout();

    }

    #endregion

    private System.Windows.Forms.TextBox txtUsername;

    private System.Windows.Forms.TextBox txtPassword;

    private System.Windows.Forms.Button Enter;

    }

    }

     

     

    Wednesday, December 19, 2007 6:13 AM

All replies

  • I cant find any button named "login".
    Only the Text property of the button is set to "Login",
    where if you change this text would never reflect any other referrences.

    What are the error you are getting

    Tuesday, December 18, 2007 7:38 AM
  • I changed the button to Enter but it didnt fix anything...

     

    If it helps, here is the previous version of my code before i changed the button, when i changed it, instead of getting one error I got about 30.

     

    In this code I only get one error

     

    Here's the .cs code

     

    Code Block

    using System;

    using System.Collections.Generic;

    using System.ComponentModel;

    using System.Data;

    using System.Drawing;

    using System.Linq;

    using System.Text;

    using System.Windows.Forms;

    namespace Desktop_Window

    {

    public partial class Form2 : Form

    {

    public Form2()

    {

    InitializeComponent();

    }

    private void Form2_Load(object sender, EventArgs e)

    {

    }

    public class Login : System.Windows.Forms.Form

    {

    private int iCount; // this integer is declared to help count the number of times a user tried to login.

     

     

    private Form3 frmForm3 = new Form3(); // this line declares a variable that will point the user to the Main Screen upon a successful login. The second form created is called MainScreen.cs

     

    }

     

    private void Enter_Click_1(object sender, EventArgs e)

    {

    //The connection string is used to describe the type of database, the security information and the location to the database. Use a Sql Connection string if you are using SqlServer

    string ConString = "Provider=Microsoft.Jet.OLEDB.4.0;Password=\"\";User ID=Admin;Data Source=\"databasename.mdb\";";

     

     

    //Create a new connection object and assign the ConString Connection String above

    OleDb.OleDbConnection DBCon = new OleDb.OleDbConnection(ConString);

     

     

    g_Login = this.txtUsername.Text;

    string strPassword = this.txtPassword.Text;

     

     

    if (g_Login == "" | strPassword == "")

    {

    MessageBox.Show("You are missing information. Please make sure that both the username and password fields are filled out.", "Missing Info");

    this.txtUsername.Focus();

    return;

    }

     

     

    // The database has two fields in the Users table. A UserID field, which is the primary key and declared as a text. The other field is Password, which is a text as well.

    string strsql = "SELECT [UserID], [Password] FROM Users WHERE [UserID]='" + g_login + "' ";

    OleDb.OleDbCommand cm = new OleDb.OleDbCommand(strsql, DBCon);

    OleDb.OleDbDataReader dr = null;

    bool valid = false;

    bool HasRows = false;

    try

    {

    DBCon.Open();

    dr = cm.ExecuteReader();

    if (dr.HasRows)

    {

    while (dr.Read())

    {

    if (strPassword == dr["Password"])

    {

    valid = true;

    }

    }

    HasRows = true;

    }

    dr.Close();

    }

    catch (OleDb.OleDbException exO)

    {

    MessageBox.Show(exO.Message);

    }

    catch (Exception ex)

    {

    MessageBox.Show(ex.Message);

    }

    finally

    {

    if (DBCon.State == ConnectionState.Open)

    {

    DBCon.Close();

    }

    cm = null;

    dr = null;

    DBCon.Dispose();

    GC.Collect();

    }

    iCount = iCount + 1;

    if (valid == true)

    {

    this.Hide();

    frmMain.Show();

    }

    else if (iCount == 3)

    {

    MessageBox.Show("Contact Safreak!", "Invalid Info");

    this.Close();

    }

    else if (HasRows == false)

    {

    MessageBox.Show("Invalid user name, try again!", "Invalid Info");

    this.txtUsername.Focus();

    this.txtUsername.Text = "";

    this.txtPassword.Text = "";

    }

    else

    {

    MessageBox.Show("Invalid password, try again!", "Invalid Info");

    this.txtPassword.Focus();

    this.txtPassword.Text = "";

    }

    }

    }

    }

     

     

     

     

     

     

    Here's my design.cs code

     

    Code Block

    namespace Desktop_Window

    {

    partial class Form2

    {

    ///

    /// Required designer variable.

    ///

    private System.ComponentModel.IContainer components = null;

    ///

    /// Clean up any resources being used.

    ///

    /// true if managed resources should be disposed; otherwise, false.

    protected override void Dispose(bool disposing)

    {

    if (disposing && (components != null))

    {

    components.Dispose();

    }

    base.Dispose(disposing);

    }

    #region Windows Form Designer generated code

    ///

    /// Required method for Designer support - do not modify

    /// the contents of this method with the code editor.

    ///

    private void InitializeComponent()

    {

    this.Username = new System.Windows.Forms.TextBox();

    this.Password = new System.Windows.Forms.TextBox();

    this.Login = new System.Windows.Forms.Button();

    this.SuspendLayout();

    //

    // Username

    //

    this.Username.Location = new System.Drawing.Point(109, 78);

    this.Username.Name = "Username";

    this.Username.Size = new System.Drawing.Size(199, 20);

    this.Username.TabIndex = 0;

    //

    // Password

    //

    this.Password.Location = new System.Drawing.Point(112, 143);

    this.Password.Name = "Password";

    this.Password.Size = new System.Drawing.Size(218, 20);

    this.Password.TabIndex = 1;

    //

    // Login

    //

    this.Login.Location = new System.Drawing.Point(348, 187);

    this.Login.Name = "Login";

    this.Login.Size = new System.Drawing.Size(96, 54);

    this.Login.TabIndex = 2;

    this.Login.Text = "Login";

    this.Login.UseVisualStyleBackColor = true;

    this.Login.Click += new System.EventHandler(this.Enter_Click_1);

    //

    // Form2

    //

    this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

    this.ClientSize = new System.Drawing.Size(665, 482);

    this.Controls.Add(this.Login);

    this.Controls.Add(this.Password);

    this.Controls.Add(this.Username);

    this.Name = "Form2";

    this.Text = "Form2";

    this.Load += new System.EventHandler(this.Form2_Load);

    this.ResumeLayout(false);

    this.PerformLayout();

    }

    #endregion

    private System.Windows.Forms.TextBox Username;

    private System.Windows.Forms.TextBox Password;

    private System.Windows.Forms.Button Login;

    }

    }

     

     

     

     

    And here is the error im getting

     

    Code Block

     

    Error 12 The type 'Desktop_Window.Form2' already contains a definition for 'Login' C:\Documents and Settings\Donovan\My Documents\Visual Studio 2008\Projects\Desktop Window\Desktop Window\Form2.Designer.cs 80 45 Desktop Window

     

     


     

    While my code is set like this i only recieve one error. I was told before that the error was because i had both a button and a class named as login, but whenever i change one thing i recieve about 30-40 errors.
    Wednesday, December 19, 2007 1:08 AM
  • Ok, first of all, your text boxes are named 'Username' and 'Password', not txtUsername and txtPassword. What is frMain? You have undefined variables of type string and int - g_Login and iCount. Also, you spelled g_Login as 'g_login' in one place. I am assuming that frMain is another form in your project. You need to create an instance of it before you can call .Show() method on it. Not really sure where Login class is used...

     

    Code:

    Code Block

    using System;

    using System.Collections.Generic;

    using System.ComponentModel;

    using System.Data;

    using System.Drawing;

    using System.Linq;

    using System.Text;

    using System.Windows.Forms;

    namespace Desktop_Window

    {

    public partial class Form2 : Form

    {

    public Form2()

    {

    InitializeComponent();

    }

    private void Form2_Load(object sender, EventArgs e)

    {

    }

    public class Login : System.Windows.Forms.Form

    {

    private int iCount; // this integer is declared to help count the number of times a user tried to login.

     

     

     

     

    private Form3 frmForm3 = new Form3(); // this line declares a variable that will point the user to the Main Screen upon a successful login. The second form created is called MainScreen.cs

     

     

    }

    private void Enter_Click(object sender, EventArgs e)

    {

    //The connection string is used to describe the type of database, the security information and the location to the database. Use a Sql Connection string if you are using SqlServer

    string ConString = "Provider=Microsoft.Jet.OLEDB.4.0;Password=\"\";User ID=Admin;Data Source=\"databasename.mdb\";";

     

     

     

     

    //Create a new connection object and assign the ConString Connection String above

    System.Data.OleDb.OleDbConnection DBCon = new System.Data.OleDb.OleDbConnection(ConString);

     

     

     

     

    string g_Login = this.txtUsername.Text;

    string strPassword = this.txtPassword.Text;

     

     

     

     

    if (g_Login == "" | strPassword == "")

    {

    MessageBox.Show("You are missing information. Please make sure that both the username and password fields are filled out.", "Missing Info");

    this.txtUsername.Focus();

    return;

    }

     

     

     

     

    // The database has two fields in the Users table. A UserID field, which is the primary key and declared as a text. The other field is Password, which is a text as well.

    string strsql = "SELECT [UserID], [Password] FROM Users WHERE [UserID]='" + g_Login + "' ";

    System.Data.OleDb.OleDbCommand cm = new System.Data.OleDb.OleDbCommand(strsql, DBCon);

    System.Data.OleDb.OleDbDataReader dr = null;

    bool valid = false;

    bool HasRows = false;

    int iCount = 0;

    try

    {

    DBCon.Open();

    dr = cm.ExecuteReader();

    if (dr.HasRows)

    {

    while (dr.Read())

    {

    if (strPassword == dr["Password"].ToString())

    {

    valid = true;

    }

    }

    HasRows = true;

    }

    dr.Close();

    }

    catch (System.Data.OleDb.OleDbException exO)

    {

    MessageBox.Show(exO.Message);

    }

    catch (Exception ex)

    {

    MessageBox.Show(ex.Message);

    }

    finally

    {

    if (DBCon.State == ConnectionState.Open)

    {

    DBCon.Close();

    }

    cm = null;

    dr = null;

    DBCon.Dispose();

    GC.Collect();

    }

    iCount = iCount + 1;

    if (valid == true)

    {

    this.Hide();

    frmMain main = new frmMain();

    main.Show();

    }

    else if (iCount == 3)

    {

    MessageBox.Show("Contact Safreak!", "Invalid Info");

    this.Close();

    }

    else if (HasRows == false)

    {

    MessageBox.Show("Invalid user name, try again!", "Invalid Info");

    this.txtUsername.Focus();

    this.txtUsername.Text = "";

    this.txtPassword.Text = "";

    }

    else

    {

    MessageBox.Show("Invalid password, try again!", "Invalid Info");

    this.txtPassword.Focus();

    this.txtPassword.Text = "";

    }

     

    }

    }

    }

     

     

     

    Designer code:

     

    Code Block

    namespace Desktop_Window

    {

    partial class Form2

    {

    /// <summary>

    /// Required designer variable.

    /// </summary>

    private System.ComponentModel.IContainer components = null;

    /// <summary>

    /// Clean up any resources being used.

    /// </summary>

    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>

    protected override void Dispose(bool disposing)

    {

    if (disposing && (components != null))

    {

    components.Dispose();

    }

    base.Dispose(disposing);

    }

    #region Windows Form Designer generated code

    /// <summary>

    /// Required method for Designer support - do not modify

    /// the contents of this method with the code editor.

    /// </summary>

    private void InitializeComponent()

    {

    this.txtUsername = new System.Windows.Forms.TextBox();

    this.txtPassword = new System.Windows.Forms.TextBox();

    this.Enter = new System.Windows.Forms.Button();

    this.SuspendLayout();

    //

    // txtUsername

    //

    this.txtUsername.Location = new System.Drawing.Point(109, 78);

    this.txtUsername.Name = "txtUsername";

    this.txtUsername.Size = new System.Drawing.Size(199, 20);

    this.txtUsername.TabIndex = 0;

    //

    // txtPassword

    //

    this.txtPassword.Location = new System.Drawing.Point(112, 143);

    this.txtPassword.Name = "txtPassword";

    this.txtPassword.Size = new System.Drawing.Size(218, 20);

    this.txtPassword.TabIndex = 1;

    //

    // Enter

    //

    this.Enter.Location = new System.Drawing.Point(348, 187);

    this.Enter.Name = "Enter";

    this.Enter.Size = new System.Drawing.Size(96, 54);

    this.Enter.TabIndex = 2;

    this.Enter.Text = "Login";

    this.Enter.UseVisualStyleBackColor = true;

    //

    // Form2

    //

    this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

    this.ClientSize = new System.Drawing.Size(665, 482);

    this.Controls.Add(this.Enter);

    this.Controls.Add(this.txtPassword);

    this.Controls.Add(this.txtUsername);

    this.Name = "Form2";

    this.Text = "Form2";

    this.Load += new System.EventHandler(this.Form2_Load);

    this.ResumeLayout(false);

    this.PerformLayout();

    }

    #endregion

    private System.Windows.Forms.TextBox txtUsername;

    private System.Windows.Forms.TextBox txtPassword;

    private System.Windows.Forms.Button Enter;

    }

    }

     

     

    Wednesday, December 19, 2007 6:13 AM
  •  

    Go to addnewitems->login form to get a new login form.I  think it is this that you asked for.

     

    Tuesday, March 25, 2008 10:50 AM