public Frame() { int w = 300, h = 105; Icon icon = new Icon("../../content/orc_icon.ico"); this.Icon = icon; this.SetBounds(0, 0, w, h); this.Text = "NKT - Time Changer"; this.MaximizeBox = false; this.MinimizeBox = false; this.FormBorderStyle = FormBorderStyle.FixedDialog; uint[] keys = { 0x70, 0x71, 0x72, 0x73, 0x74, 0x75 }; string[] keyNames = { "F1", "F2", "F3", "F4", "F5", "F6" }; ComboBox keySelection = new ComboBox(); keySelection.Text = "Select bound key"; keySelection.Parent = this; keySelection.SetBounds(5, 5, w - 25, 25); for (int i = 0; i < keys.Length; i++) { keySelection.Items.Add("CTRL + " + keyNames[i]); } ApplyButton apply = new ApplyButton(() => { if (keySelection.SelectedIndex != -1) { ChangeBind(this.Handle, keys[keySelection.SelectedIndex]); } }); apply.Text = "Apply"; apply.Parent = this; apply.SetBounds(5, 35, w - 25, 25); RegisterHotKey(this.Handle, 0, 0x0002, keys[0]); }