#endregion
///
/// 应用程序的主入口点。
///
[STAThread]
static void Main(string[] args)
{
if(args.Length==1)
if(args[0].Substring(0,2).Equals("/c"))
{
MessageBox.Show("没有设置项功能","C# Screen Saver");
Application.Exit();
}
else if(args[0]=="/s")
Application.Run(new screen());
else if(args[0]=="/a")
{
MessageBox.Show("没有口令功能","C# Screen saver");
Application.Exit();
}
else
Application.Run(new screen());
}
private void Form1_Load(object sender, System.EventArgs e)
{
speed=0;
System.Drawing.Rectangle ssWorkArea=System.Windows.Forms.Screen.GetWorkingArea(this);
file://屏幕显示区域
width1=ssWorkArea.Width; file://屏幕宽度
height1=ssWorkArea.Height; file://屏幕高度
}
private void timerSaver_Tick(object sender, System.EventArgs e) file://计时器响应事件
{
word.Visible=true;
word.Text=str;
word.Height=word.Font.Height; file://设置文本的高度
word.Width=word.Text.Length*(int)word.Font.Size*2; file://设置文本的宽度
PlayScreenSaver();
}

