Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- put this in the middle of the public partial class
- -------------------------------------------------------------
- [return: MarshalAs(UnmanagedType.Bool)]
- [DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
- public static extern void BlockInput([In, MarshalAs(UnmanagedType.Bool)] bool fBlockIt);
- [DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")]
- private static extern IntPtr CreateRoundRectRgn
- (
- int nLeftRect, // x-coordinate of upper-left corner
- int nTopRect, // y-coordinate of upper-left corner
- int nRightRect, // x-coordinate of lower-right corner
- int nBottomRect, // y-coordinate of lower-right corner
- int nWidthEllipse, // height of ellipse
- int nHeightEllipse // width of ellipse
- );
- int w = Screen.PrimaryScreen.Bounds.Width;
- int h = Screen.PrimaryScreen.Bounds.Height;
- -------------------------------------------------------------------------------------
- And then type this
- this.Location = new Point(0, 0);
- Size = new Size(w, h);
- TopMost = true;
- Cursor.Hide();
- BlockInput(true);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement