• 如何制作winform得启动画面


    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, 100142);
                    }

                }

                
    this.BackgroundImage = bitMap;
            }

            
    protected override void Dispose(bool disposing)
            
    {
                
    base.Dispose(disposing);
                
    if (disposing)
                
    {
                    
    if (bitMap != null)
                    
    {
                        bitMap.Dispose();
                        bitMap 
    = null;
                    }

                }

            }

        }

    }

  • 相关阅读:
    ZOJ 2604 Little Brackets DP
    js实现回放拖拽轨迹-------Day48
    Android蓝牙开发
    linux中的两个很重要的信号:SIGALRM信号和SIGCHID信号
    MySQL mysqldump数据导出详解
    JFinal redis cluster集群插件
    nginx平滑升级
    温故而知新-String类
    Linux环境变量具体解释
    android消息机制
  • 原文地址:https://www.cnblogs.com/jillzhang/p/543613.html
Copyright © 2020-2023  润新知