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); }
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); }
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); }
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); }
static void Main() { Screensaver ss = new Screensaver(); ss.Run(); }
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); }