public Form1()
        {
            InitializeComponent();
            KeyboardHook.SetHook();
            //   this.TopMost = true;
            this.KeyDown   += new KeyEventHandler(KeyEvent);
            textBox1.Text  += ClassCatchWindow.checkdxversion_dxdiag();
            StartPosition   = FormStartPosition.CenterScreen;
            Size            = new System.Drawing.Size(500, 500);
            FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; // no borders

            TopMost = true;                                              // make the form always on top
            Visible = true;                                              // Important! if this isn't set, then the form is not shown at all

            //// Set the form click-through
            //int initialStyle = GetWindowLong(this.Handle, -20);
            //SetWindowLong(this.Handle, -20, initialStyle | 0x80000 | 0x20);

            //// Create device presentation parameters
            //PresentationParameters p = new PresentationParameters();
            //p.IsFullScreen = false;
            //p.DeviceWindowHandle = this.Handle;
            //p.BackBufferFormat = SurfaceFormat.Vector4;
            //p.PresentationInterval = PresentInterval.One;

            //// Create XNA graphics device
            //dev = new GraphicsDevice(GraphicsAdapter.DefaultAdapter, GraphicsProfile.Reach, p);

            //// Init basic effect
            //effect = new BasicEffect(dev);

            //// Extend aero glass style on form init
            //OnResize(null);
        }
Example #2
0
        public Form1()
        {
            InitializeComponent();
            KeyboardHook.SetHook();
            //   this.TopMost = true;
            //   this.KeyDown += new KeyEventHandler(KeyEvent);
            textBox1.Text       += ClassCatchWindow.checkdxversion_dxdiag();
            StartPosition        = FormStartPosition.CenterScreen;
            AllowTransparency    = true;
            this.BackColor       = Color.Beige;
            this.TransparencyKey = BackColor;
            //  this.Opacity = 0;
            //Size = new System.Drawing.Size(500, 500);
            //  FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;  // no borders

            Visible = true;
        }