I think your problem here is that you are trying two separate comparisons, and both are false. The reason for this is that when
two keys are pressed down, the values are combined in a bitwise value. It probably works something like as follows:
Shift = 1
Control = 2
Alt = 4
Therefore, if shift and control are both pressed, the value in control.modifier keys will be 1 + 2 = 3. Thus, the comparision
Code:
If control.modifierkeys = keys.shift andalso control.modifierkeys = keys.control
is really
if 3 = 1 andalso 3 = 2
what we need is ' if 3 = 3 ' which we'll get by doing the following
Code:
If Control.ModifierKeys = (Keys.Shift + Keys.Control)
I think this should work.