⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 welcomeform.cs

📁 青鸟影院
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;

namespace GreenBirdCinema
{
    public partial class WelcomeForm : Form
    {
        public WelcomeForm()
        {
            InitializeComponent();
        }

        int x, y;
        private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
        {
            x = e.X;
            y = e.Y;
            if (e.X >= 450 && e.X <= 520 && e.Y >= 195 && e.Y <= 265)
            {
                this.pictureBox1.Cursor = Cursors.Hand;
                this.toolTip1.Show("点击蝴蝶进入主界面",this.pictureBox1);
                Thread.Sleep(1000);
            }
            else
            {
                this.pictureBox1.Cursor = Cursors.Default;
            }
        }

        private void LoadWithBar()
        {
            this.progressBar1.Visible = true;
            progressBar1.Minimum = 1;
            progressBar1.Maximum = 30;
            progressBar1.Value = 1;
            progressBar1.Step = 1;
            for (int j = 1; j < progressBar1.Maximum; j++)
            {
                Thread.Sleep(100);
                progressBar1.PerformStep();
            }
            this.progressBar1.Visible = false ;
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            if (x >= 450 && x <= 520 && y >= 195 && y <= 265)
            {
                LoadWithBar();
                MainForm mf = new MainForm();
                mf.ShowDialog();
            }
        }

        private void WelcomeForm_Load(object sender, EventArgs e)
        {
            this.pictureBox1.Click += new EventHandler(pictureBox1_Click);
            this.progressBar1.Visible = false;
        }      
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -