Provides initialization, timing and windowing facilities for screensavers.
Esempio n. 1
0
            internal Window(Screensaver screensaver, Form form)
            {
                this.screensaver = screensaver;
                this.form        = form;
                this.size        = form.ClientSize;
                this.graphics    = form.CreateGraphics();
                this.handle      = form.Handle;

                form.MouseMove        += new MouseEventHandler(form_MouseMove);
                form.MouseClick       += new MouseEventHandler(form_MouseClick);
                form.MouseDoubleClick += new MouseEventHandler(form_MouseDoubleClick);
                form.MouseDown        += new MouseEventHandler(form_MouseDown);
                form.MouseUp          += new MouseEventHandler(form_MouseUp);
                form.MouseWheel       += new MouseEventHandler(form_MouseWheel);

                form.KeyDown  += new KeyEventHandler(form_KeyDown);
                form.KeyUp    += new KeyEventHandler(form_KeyUp);
                form.KeyPress += new KeyPressEventHandler(form_KeyPress);

                //form.BackColor = Color.Lime;
                //form.TransparencyKey = Color.Lime;
                form.Opacity = 0.01;

                this.screensaver.PreUpdate  += new EventHandler(screensaver_PreUpdate);
                this.screensaver.PostUpdate += new EventHandler(screensaver_PostUpdate);
            }
Esempio n. 2
0
            internal Window(Screensaver screensaver, IntPtr handle)
            {
                this.screensaver = screensaver;
                this.handle      = handle;
                this.graphics    = Graphics.FromHwnd(handle);
                this.size        = GetClientRect(handle).Size;

                this.screensaver.PostUpdate += new EventHandler(screensaver_PostUpdate);
            }
Esempio n. 3
0
            internal Window(Screensaver screensaver, Form form)
            {
                this.screensaver = screensaver;
                this.form        = form;
                this.size        = form.ClientSize;
                this.graphics    = form.CreateGraphics();
                this.handle      = form.Handle;

                form.KeyPress += new KeyPressEventHandler(form_KeyPress);

                this.screensaver.PostUpdate += new EventHandler(screensaver_PostUpdate);
            }
Esempio n. 4
0
            internal Window(Screensaver screensaver, Form form)
            {
                this.screensaver = screensaver;
                this.form        = form;
                //this.size = form.ClientSize;
                this.size     = form.Size;
                this.graphics = form.CreateGraphics();
                this.handle   = form.Handle;

                form.MouseMove        += new MouseEventHandler(form_MouseMove);
                form.MouseClick       += new MouseEventHandler(form_MouseClick);
                form.MouseDoubleClick += new MouseEventHandler(form_MouseDoubleClick);
                form.MouseDown        += new MouseEventHandler(form_MouseDown);
                form.MouseUp          += new MouseEventHandler(form_MouseUp);
                form.MouseWheel       += new MouseEventHandler(form_MouseWheel);

                form.KeyDown  += new KeyEventHandler(form_KeyDown);
                form.KeyUp    += new KeyEventHandler(form_KeyUp);
                form.KeyPress += new KeyPressEventHandler(form_KeyPress);

                this.screensaver.PreUpdate  += new EventHandler(screensaver_PreUpdate);
                this.screensaver.PostUpdate += new EventHandler(screensaver_PostUpdate);
            }
Esempio n. 5
0
        static void Main()
        {
            Screensaver ss = new Screensaver();

            ss.Run();
        }
Esempio n. 6
0
 static void Main()
 {
     Screensaver ss = new Screensaver();
     ss.Run();
 }
Esempio n. 7
0
            internal Window(Screensaver screensaver, IntPtr handle)
            {
                this.screensaver = screensaver;
                this.handle = handle;
                this.graphics = Graphics.FromHwnd(handle);
                this.size = GetClientRect(handle).Size;

                this.screensaver.PostUpdate += new EventHandler(screensaver_PostUpdate);
            }
Esempio n. 8
0
            internal Window(Screensaver screensaver, Form form)
            {
                this.screensaver = screensaver;
                this.form = form;
                this.size = form.ClientSize;
                this.graphics = form.CreateGraphics();
                this.handle = form.Handle;

                form.KeyPress += new KeyPressEventHandler(form_KeyPress);

                this.screensaver.PostUpdate += new EventHandler(screensaver_PostUpdate);
            }
Esempio n. 9
0
            internal Window(Screensaver screensaver, Form form)
            {
                this.screensaver = screensaver;
                this.form = form;
                this.size = form.ClientSize;
                this.graphics = form.CreateGraphics();
                this.handle = form.Handle;

                form.MouseMove += new MouseEventHandler(form_MouseMove);
                form.MouseClick += new MouseEventHandler(form_MouseClick);
                form.MouseDoubleClick += new MouseEventHandler(form_MouseDoubleClick);
                form.MouseDown += new MouseEventHandler(form_MouseDown);
                form.MouseUp += new MouseEventHandler(form_MouseUp);
                form.MouseWheel += new MouseEventHandler(form_MouseWheel);

                form.KeyDown += new KeyEventHandler(form_KeyDown);
                form.KeyUp += new KeyEventHandler(form_KeyUp);
                form.KeyPress += new KeyPressEventHandler(form_KeyPress);

                this.screensaver.PreUpdate += new EventHandler(screensaver_PreUpdate);
                this.screensaver.PostUpdate += new EventHandler(screensaver_PostUpdate);
            }