Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Login Form.

Reply
Thread Tools

Login Form.

 
 
rajaroy rajaroy is offline
Junior Member
Join Date: Feb 2009
Posts: 2
 
      02-14-2009
Hi there programmers,

I am recently trying to get a form to work with a login system.
It is a very simple form but its eating my ass off and can't get it to work.

I have simply 2 forms.
Form 2 and Form3.

I want to login with a username test and password 1234.
if the username and pass are not correct its should do nothing.
but when username and pass correct it needs to opens Form3
There is also no database involved here.

username field = textbox1
password field = textbox2

Maybe this is the simplest script ever but i really cant get it to work.
Over the internet there are too many complicated script's that i dont understand completely.

Please help....

Regards,

Raja

Form2:
Code:
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 WindowsFormsApplication1
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void annuleren_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void ok_Click(object sender, EventArgs e)
        {
            string waarde;
            waarde = textbox2.Text;
            int n = Int32.Parse("waarde");
            if (n == 1234)
                textbox2.Text = "1234";
                Form3 f3 = new Form3();
                f3.Show();
        }
    }
}
-----------------------------------------------------------------------
Form3:
Code:
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 WindowsFormsApplication1
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }

        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void sluiten_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
 

Last edited by rajaroy; 02-14-2009 at 10:31 PM..
Reply With Quote
 
 
 
 
rajaroy rajaroy is offline
Junior Member
Join Date: Feb 2009
Posts: 2
 
      02-15-2009
Little bump
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
News login different from mail login William W. Plummer Firefox 21 04-08-2005 05:37 AM
Login Failed: Error 18456: Unable to login to run SP on local serv =?Utf-8?B?Z2FyaWJhbGRp?= ASP .Net 2 02-25-2005 09:17 PM
Cannot open database requested in login 'xyz'. Login fails. Nans ASP .Net 2 06-17-2004 07:06 AM
Forms Login Page Not Login Out Hermit Dave ASP .Net 5 01-13-2004 07:14 AM
Re: PLEASE? Any way to get the user's nt login from the pc -- not the server login? William F. Robertson, Jr. ASP .Net 0 07-02-2003 03:57 PM



Advertisments