Is it Possible to assign a Short Cut Key dynamically for ToolStripMenuItem ? or Table Driven ?
Thanks,
Shankar
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Shankar MPosted Nov 26, 2012, 6:28 AM
Hi Ravi,
No Ravi, I mean Whether the Shortcuts can be assigned something like Table-Driven values,
Suppose if I have maintain a column in Table with ShortCutKey and bind it with the value
Keys.Control | Keys.C. So that I can assign the ShortCutKey to the ToolStripMenuItem and add it to the ToolStrip Items dynamically at run when Loading the MenuStrip dynamically.
Thanks,
Shankar
venkata kumarPosted Nov 26, 2012, 3:49 AM
u can write fallowing code in formname_keydown
private void PurchaseReturn_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.N && e.Control)
{
//code
}
}
Thanks & Regards
Kumar