c# 黑屏

zch782 2007-10-30 01:33:20
怎么样用C# 实现全屏黑屏(只是形式),黑了以后可以用鼠标键盘移动下就可以恢复的

是调用win里面的函数么还是其他方法 ,,该怎么做啊??谢谢
...全文
162 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
shulin_1217 2007-10-30
  • 打赏
  • 举报
回复
public class pingbao: System.Windows.Forms.Form
{
public static void Main(string arg)
{
Application.Run(new mypingbao(arg)); //把参数传到Form中去
}


public mypingbao(string arg)
{
//实现全屏显示
this.Width = Screen.PrimaryScreen.Bounds.Width;
this.Height = Screen.PrimaryScreen.Bounds.Height;
this.Left = 0;
this.Top = 0;
switch(arg.ToLower())
{
case '/s':
/*...正常运行实现代码*/
break;
case '/a':
/*...密码对话框实现代码*/
break;
case '/c':
/*...参数设置实现代码*/
break;
case '/p':
/*...预览实现代码*/
break;
default:
Application.Exit(); //其它情况退出
break;
}
/*...其它代码*/
}
/*...它代码*/
}
程序成后,把生成的EXE扩展名改变“.scr”,再复制到System32下便可。在设置 桌面属性中的设置写好的屏保.scr文件
linsoo 2007-10-30
  • 打赏
  • 举报
回复
以前做过一个屏保,可以用GDI+绘图,至于黑了以后可以用鼠标键盘移动下就可以恢复这样的功能只要在Form的鼠标键盘事件里写退出代码就好了...
zch782 2007-10-30
  • 打赏
  • 举报
回复
有详细点的么?代码阿什么的
linsoo 2007-10-30
  • 打赏
  • 举报
回复
做个屏保

110,526

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧