메뉴 건너뛰기

Programing

C# 게시판

프로세싱박스 만들기

관리자2 2018.12.26 18:58 조회 수 : 152

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 ts10

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            this.Timer.Enabled = true;

        }

 

        private void Timer_Tick(object sender, EventArgs e)

        {

            if (this.pbProcess.Value < 100)

            {

                this.pbProcess.Value += 20;

            }

            else

            {

                this.Timer.Enabled = false;

                this.Close();

            }this.lblprocress.Text = this.pbProcess.Value.ToString();

        }

    }

}

시작 버튼을 누르면 프로세싱 박스가 차오르고 다 차면 알아서 프로그램이 종료된다.
위로