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; }
private void Form1_FormClosed(object sender, FormClosedEventArgs e) { KeyboardHook.UnSetHook(); }