using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
namespace SlashScreenLib
{
public class SlashScreenForm:Form
{
static SlashScreenForm slashScreen;
Bitmap bitMap;
public static SlashScreenForm SlashScreen
{
get
{
if (slashScreen == null)
{
slashScreen = new SlashScreenForm();
}
return slashScreen;
}
}
public SlashScreenForm()
{
//SlashScreen肯定显示在屏幕中央
this.StartPosition = FormStartPosition.CenterScreen;
//应该没有边框
this.FormBorderStyle = FormBorderStyle.None;
//获取SlashScreen要显示的图片
bitMap = Resources.Resource.SlashScreen;
//窗口大小与图片大小一致
this.ClientSize = bitMap.Size;
//在图片上写上字
using (Font f = new Font("宋体", 18))
{
using (Graphics g = Graphics.FromImage(bitMap))
{
g.DrawString("Jillzhang", f, Brushes.Black, 100, 142);
}
}
this.BackgroundImage = bitMap;
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (disposing)
{
if (bitMap != null)
{
bitMap.Dispose();
bitMap = null;
}
}
}
}
}
Word教程网 | Excel教程网 | Dreamweaver教程网 | Fireworks教程网 | PPT教程网 | FLASH教程网 | PS教程网 |
HTML教程网 | DIV CSS教程网 | FLASH AS教程网 | ACCESS教程网 | SQL SERVER教程网 | C语言教程网 | JAVASCRIPT教程网 |
ASP教程网 | ASP.NET教程网 | CorelDraw教程网 |