Here is what I have so far.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace DreamInCode
{
class Program
{
[STAThread]
static void Main(string[] args)
{
if (args.Length > 0) //we have arguments
{
//"/s", show the screen saver.
if (args[0].ToLower().Trim().Substring(0, 2) == "/s")
{
//show the screen saver.
Application.EnableVisualSytles();
Application.SetCompatibleTextRenderingDefault(false);
ShowScreenSaver();
Application.Run();
}
//"/p", preview screen saver.
else if (args[0].ToLower().Trim().Substring(0, 2) == "/p")
{
//preview screen saver.
}
//"/c", config screeen saver.
else if (args[0].ToLower().Trim().Substring(0, 2) == "/c")
{
//configure the screen saver.
}
}
else //no arguments passed
{
//show screen saver anyway.
}
}
static void ShowScreenSaver()
{
foreach (Screen screen in Screen.AllScreens)
{
MainForm screensaver = new MainForm(screen.Bounds);
screensaver.Show();
}
}
}
}
Error Messages:
Quote
Error 1 The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an assembly reference?)
Error 1 The name 'EnableVisualSytles' does not exist in the current context C:\Documents and Settings\Cam\My Documents\Visual Studio 2008\Projects\DreamInCode\DreamInCode\Program.cs 20 33 DreamInCode
Error 2 The name 'Application' does not exist in the current context C:\Documents and Settings\Cam\My Documents\Visual Studio 2008\Projects\DreamInCode\DreamInCode\Program.cs 20 21 DreamInCode
Error 3 The name 'Application' does not exist in the current context C:\Documents and Settings\Cam\My Documents\Visual Studio 2008\Projects\DreamInCode\DreamInCode\Program.cs 21 21 DreamInCode
Error 4 The name 'Application' does not exist in the current context C:\Documents and Settings\Cam\My Documents\Visual Studio 2008\Projects\DreamInCode\DreamInCode\Program.cs 23 21 DreamInCode
Error 5 The name 'Screen' does not exist in the current context C:\Documents and Settings\Cam\My Documents\Visual Studio 2008\Projects\DreamInCode\DreamInCode\Program.cs 43 39 DreamInCode
Error 6 The type or namespace name 'Screen' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Cam\My Documents\Visual Studio 2008\Projects\DreamInCode\DreamInCode\Program.cs 43 22 DreamInCode
Error 7 The type or namespace name 'MainForm' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Cam\My Documents\Visual Studio 2008\Projects\DreamInCode\DreamInCode\Program.cs 45 17 DreamInCode
Error 8 The type or namespace name 'MainForm' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Cam\My Documents\Visual Studio 2008\Projects\DreamInCode\DreamInCode\Program.cs 45 44 DreamInCode
Error 1 The name 'EnableVisualSytles' does not exist in the current context C:\Documents and Settings\Cam\My Documents\Visual Studio 2008\Projects\DreamInCode\DreamInCode\Program.cs 20 33 DreamInCode
Error 2 The name 'Application' does not exist in the current context C:\Documents and Settings\Cam\My Documents\Visual Studio 2008\Projects\DreamInCode\DreamInCode\Program.cs 20 21 DreamInCode
Error 3 The name 'Application' does not exist in the current context C:\Documents and Settings\Cam\My Documents\Visual Studio 2008\Projects\DreamInCode\DreamInCode\Program.cs 21 21 DreamInCode
Error 4 The name 'Application' does not exist in the current context C:\Documents and Settings\Cam\My Documents\Visual Studio 2008\Projects\DreamInCode\DreamInCode\Program.cs 23 21 DreamInCode
Error 5 The name 'Screen' does not exist in the current context C:\Documents and Settings\Cam\My Documents\Visual Studio 2008\Projects\DreamInCode\DreamInCode\Program.cs 43 39 DreamInCode
Error 6 The type or namespace name 'Screen' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Cam\My Documents\Visual Studio 2008\Projects\DreamInCode\DreamInCode\Program.cs 43 22 DreamInCode
Error 7 The type or namespace name 'MainForm' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Cam\My Documents\Visual Studio 2008\Projects\DreamInCode\DreamInCode\Program.cs 45 17 DreamInCode
Error 8 The type or namespace name 'MainForm' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Cam\My Documents\Visual Studio 2008\Projects\DreamInCode\DreamInCode\Program.cs 45 44 DreamInCode

New Topic/Question
Reply




MultiQuote





|