怎么样用C# 实现全屏黑屏(只是形式),黑了以后可以用鼠标键盘移动下就可以恢复的   是调用win里面的函数么还是其他方法 ,,该怎么做啊??谢谢

解决方案 »

  1.   

    以前做过一个屏保,可以用GDI+绘图,至于黑了以后可以用鼠标键盘移动下就可以恢复这样的功能只要在Form的鼠标键盘事件里写退出代码就好了...
      

  2.   

    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文件