static void Main(string[] args) { ul = new UtilityLibrary.UtilityLibrary(); ul.startlooking(Keys.Delete); //starting the keyPressed Listener ul.KeyPressedEvent += Ul_KeyPressedEvent; //adding the KeyPressed Event Handler //The Programm does not have a console, it would just end, so wait ... while (true) { Thread.Sleep(1000); } }
private void Form1_Activated(object sender, EventArgs e) { if (Mainform == null) { Mainform = Form.ActiveForm; Mainform.ShowInTaskbar = false; ul.startlooking('d'); ul.KeyPressedEvent += Ul_KeyPressedEvent; LogClass.listBox2 = listBox2; } }