Taximus 0 Newbie Poster

:?: Hi everyone. I am writting restrictions on some buttons. I have a problem. I don't know how to block key "AltGr". I have it on my down right side of keyboard.

I do this:

private void Form1_KeyDown(object sender, KeyEventArgs e)
        {

            Keys keys = Control.ModifierKeys;
            if (keys == Keys.Tab || (keys == Keys.Alt)) /* here the second key is not working. Can you help me please. I can't find appropriate name for AltGr... ??? */ 
            {;}
        }

Yeah, and one more thing. I have some buttons on my form. So, in my program I move between objects and I want to use "Tab" button. So, I try to use this button

else if (e.KeyCode == Keys.Tab) 
            { /*do this*/}

but it is not moving between objects, it moves between buttons on the form. How to block movements between buttons on the form?

Thank you very much for your great help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.