Simple login interface for C # design

Source: Internet
Author: User

Open Visual 2010, create a new form, since it is the login window, so that it does not appear to maximize, minimize and drag size function (the previous section has already mentioned how to set the size), even the form's Text property value is "Login window", size arbitrary.

After the form is created, the detailed component layout of the interface begins, mainly by dragging the control on the left and then putting it into the form to define the property value. These are relatively simple.

In the Code response phase, double-click the Login button to enter the code view:
private void Button1_Click (object sender, EventArgs e)

    {        String name = this.textBox1.Text; // 获取里面的值        String password = this.textBox1.Text;        if (name.Equals("admin") && password.Equals("admin")) // 判断账号密码是否等于admin        {            MessageBox.Show("登录成功");        }        else {            MessageBox.Show("登录失败!");        }    }

Simple login interface for C # design

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.