📄 frmsplash.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace GEROSYS
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class frmSplash:System.Windows.Forms.Form
{
private System.Windows.Forms.Timer timerStart;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.Label label1;
private int liCount;
frmLogin frm=new frmLogin();
public frmSplash()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmSplash));
this.timerStart = new System.Windows.Forms.Timer(this.components);
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// timerStart
//
this.timerStart.Enabled = true;
this.timerStart.Interval = 200;
this.timerStart.Tick += new System.EventHandler(this.timerStart_Tick);
//
// label1
//
this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label1.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(128)));
this.label1.Location = new System.Drawing.Point(184, 248);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(200, 32);
this.label1.TabIndex = 2;
this.label1.Text = "版本 1.0";
//
// frmSplash
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.ClientSize = new System.Drawing.Size(432, 288);
this.ControlBox = false;
this.Controls.Add(this.label1);
this.Name = "frmSplash";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.frmSplash_MouseDown);
this.Load += new System.EventHandler(this.frmSplash_Load);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new frmSplash());
}
private void frmSplash_Load(object sender, System.EventArgs e)
{
this.label1.BackColor = Color.FromArgb(0,this.label1.BackColor);
}
private void timerStart_Tick(object sender, System.EventArgs e)
{
if (liCount!=10)
{
liCount+=1;
}
else
{
this.timerStart.Enabled =false;
this.Hide();
frm.Show();
}
}
private void frmSplash_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
this.timerStart.Enabled =false;
this.Hide();
frm.Show();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -