Click event + key pressed

  • Thread starter Thread starter infmpv00
  • Start date Start date
I

infmpv00

Hi,

I have a tabControl and when I click on a context menu and press ctrl
key I would like the information appear in a new tab, like in
iexplorer. If I don't press ctrl key the information would appear in
the same tab.
How can I archieve this goal?¿

Thanks
 
In your Contextmenu handler code, you can test the static property
Control.ModifierKeys to see whether ctl is pressed or not.

if( Keys.None != (Control.ModifierKeys & Keys.Control))
{
//ctl is pressed
}
else
{
//ctl is not pressed
}

==============
Clay Burch
Syncfusion, Inc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top