Quantcast
Channel: 《》的评论
Viewing all articles
Browse latest Browse all 63

C# 简单登录页面跳转到主窗口

$
0
0

C# 制作简单登录页面,还挺简单的,验证密码那块你自己看需求修改,该连SQL连SQL,想明文就明文。

后来经过别人提醒,发现不用再 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.Threading.Tasks;
using System.Windows.Forms;

namespace Login
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string usr = textBox1.Text;
            string psw = textBox2.Text;
            if ((usr == "Forece") & (psw == "123456"))
            {
                this.Hide();
                Form2 main = new Form2();
                main.Show();
            }
            else
            {
                MessageBox.Show("Login Failed");
            }
        }
    }
}


Viewing all articles
Browse latest Browse all 63

Trending Articles


EASY COME, EASY GO


UPDATE SC IDOL: TWO BECOME ONE


Pokemon para colorear


Sapos para colorear


Love Quotes Tagalog


Two timer Sad tagalog Love quotes


Top 7 Lies of Boys


“Mali man na ikaw ay ibigin ko, akoy iibig padin sayo”


RE: Mutton Pies (frankie241)


Vimeo 10.7.0 by Vimeo.com, Inc.


FORECLOSURE OF REAL ESTATE MORTGAGE


HOY PANGIT, MAGBAYAD KA!


Girasoles para colorear


Presence Quotes – Positive Quotes


Long Distance Relationship Tagalog Love Quotes


Tropa Quotes


“BAHAY KUBO HUGOT”


Re:Mutton Pies (lleechef)


Ka longiing longsem kaba skhem bad kaba khlain ka pynlong kein ia ka...


Vimeo 10.7.1 by Vimeo.com, Inc.