c# - How can I change shortcut keys dynamically in form application? -
i have project in windows form application. want implement dynamically shortcut keys in application. user can change shortcut keys per requirement. how can implement dynamically shortcut keys?
here might help, know isn't best way can't better.
string ii = ""; protected override bool processcmdkey(ref message msg, keys keydata) { if (keydata == (keys.control | keys.c) && ii == "c") { messagebox.show("your shortcut key is: c!!"); } return base.processcmdkey(ref msg, keydata); } private void combobox1_textchanged(object sender, eventargs e) { ii = combobox1.text; }
your combobox1
combobox
contains shortcut key options.
that might some, have add bunch of if statements. hope helps!!
Comments
Post a Comment