Add "Cancel Shutdown" Button in WorkingForm. when use UpdateProgressBar(), devide...
[marukotoolbox.git] / mp4box / SplashForm.cs
blob43c0fb232f68064b4b718cb20ee5a01d3e624924
1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Data;
5 using System.Drawing;
6 using System.Text;
7 using System.Windows.Forms;
9 namespace mp4box
11 public partial class SplashForm : Form
13 int iCount = 0;
14 public SplashForm()
16 InitializeComponent();
17 //启动画面
18 //去掉外框
19 this.FormBorderStyle = FormBorderStyle.None;
20 //背景图片
21 this.BackgroundImage = Image.FromFile("startup.jpg");
22 //屏幕中央
23 this.StartPosition = FormStartPosition.CenterScreen;
27 private void FrmStart_Load(object sender, EventArgs e)
29 timer2.Start();
30 timer2.Interval = 10;
33 private void timer2_Tick(object sender, EventArgs e)
35 if (iCount > 800)
37 //启动动画完了之后..
38 this.Close();
39 return;
41 iCount += 10;
42 //窗体透明度减小
43 this.Opacity = 1 - Convert.ToDouble(iCount) / 1000;