Visual programming in C + +

Time:2022-4-29

Familiar with simple C + + visual programming, written with Visual Studio software, the code is simple

Visual programming in C + +

        Code snippet

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 WindowsFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "student" && textBox2.Text == "123456")
                 MessageBox. Show ("login succeeded!");
            else
                MessageBox. Show ("wrong account or password!");
        }
    }
}

        Realize form display

Visual programming in C + +Visual programming in C + +

Recommended Today

MySQL high availability architecture

1. Why do you need high availability? High availability ha (high availability) is to solve single machine failure. There is no service or machine in the world that is absolutely safe and reliable, but we can achieve high availability of the system through certain schemes, so as to reduce the unacceptable risk of destruction of […]