把图标文件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 ; // 窗体透明度减小
}
}
}
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 ; // 窗体透明度减小
}
}
}