ScreenSaver.ScreenSaverForm.ScreenSaverForm C# (CSharp) Method

ScreenSaverForm() public method

public ScreenSaverForm ( IntPtr PreviewWndHandle ) : System
PreviewWndHandle IntPtr
return System
        public ScreenSaverForm(IntPtr PreviewWndHandle)
            : this()
        {
            // Set the preview window as the parent of this window
            NativeMethods.SetParent(this.Handle, PreviewWndHandle);

            // Make this a child window so it will close when the parent dialog closes
            NativeMethods.SetWindowLong(this.Handle, -16, new IntPtr(NativeMethods.GetWindowLong(this.Handle, -16) | 0x40000000));

            // Place our window inside the parent
            Rectangle ParentRect;
            NativeMethods.GetClientRect(PreviewWndHandle, out ParentRect);
            Size = ParentRect.Size;
            Location = new Point(0, 0);

            previewMode = true;
        }

Same methods

ScreenSaverForm::ScreenSaverForm ( ) : System
ScreenSaverForm::ScreenSaverForm ( Rectangle Bounds, bool shouldCache ) : System
ScreenSaverForm::ScreenSaverForm ( bool WindowMode = false ) : System