greatverve
新建C# Windows应用程序。
把图标文件ABC.ico和背景图片hy.bmp复制到目录下,
属性->复制到输出目录->始终复制
右击项目->属性->应用程序->图标和清单->图标,修改为ABC.ico
背景图片大小352*302把窗体的size属性也修改为352*302
窗体代码如下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using System.Diagnostics;
using Microsoft.Win32;

namespace StartSetup
{
    
public partial class FrmStart : Form
    {
        
int iCount = 0;
        
public FrmStart()
        {
            InitializeComponent();
            
//启动画面
            this.FormBorderStyle = FormBorderStyle.None;//去掉外框
            this.BackgroundImage = Image.FromFile("hy.bmp");//背景图片
            this.StartPosition = FormStartPosition.CenterScreen;//屏幕中央
        }

        
private void FrmStart_Load(object sender, EventArgs e)
        {
            
//启动定时器
            timer1.Start();
            timer1.Interval 
= 100;
        }

        
private void timer1_Tick(object sender, EventArgs e)
        {
            
if (iCount > 700)
            {
                Application.Exit();
//启动动画完了之后..
                return;
            }
            iCount 
+= 10;
            
this.Opacity = 1 - Convert.ToDouble(iCount) / 1000;//窗体透明度减小
        }
    }
}
源码:https://files.cnblogs.com/greatverve/StartSetup.rar

分类:

技术点:

相关文章:

  • 2021-07-18
  • 2021-09-22
  • 2021-12-29
  • 2021-10-17
  • 2021-06-12
  • 2021-09-21
  • 2021-09-06
猜你喜欢
  • 2021-06-25
  • 2021-08-05
  • 2021-10-17
  • 2022-01-21
  • 2021-10-17
  • 2021-10-17
相关资源
相似解决方案