zoukankan      html  css  js  c++  java
  • WinForm 屏保程序

    1             this.ShowInTaskbar = false;
    2             this.FormBorderStyle = FormBorderStyle.None;
    3             this.WindowState = FormWindowState.Maximized;
    4             this.BackColor = Color.Black;
    5             this.TopMost = true;

    1.不在任务栏显示

    2.窗体无边框

    3.最大化窗口

    4.背景色黑色

    5.窗口置顶

    1             this.labelText.AutoSize = false;
    2             this.labelText.ForeColor = Color.White;
    3             this.labelText.Dock = DockStyle.Fill;
    4             this.labelText.TextAlign = ContentAlignment.MiddleCenter;
    5             this.timer1.Enabled = true;

    将 label 控件 Dock 设置为填充满窗体,然后关闭自动大小,设置文字为居中,字体白色。

    启动定时器事件。

    定时器事件中去做希望屏保怎样显示。

    在窗体的 KeyDown 事件里 Application.Exit(); 退出程序。

    最后把编译好的可执行程序后缀改成 scr,

    并拷贝到系统盘Windows的system32下 这样通过桌面属性的屏幕保护程序设置一下就可以投入使用了

  • 相关阅读:
    Python使用小功能
    2月5日学习记录
    关于js的词法分析
    JavaScript
    blog界面美化
    css属性
    css三大特性
    css之选择器4
    css之选择器3-系列选择器
    css之选择器2
  • 原文地址:https://www.cnblogs.com/Aaxuan/p/10493756.html
Copyright © 2011-2022 走看看