Re: Substract enum

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Rudy Velthuis (rvelthuis_at_gmx.de)
Date: 03/13/04


Date: Sat, 13 Mar 2004 22:29:56 +0100

At 21:52:09, 13.03.2004, Robin Theilade wrote:

> I didn't define the enum it is build in within the .NET framework named
> System.Windows.Forms.Keys and is already marked with an Flags
> attribute.. (MSDN link:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/h
> tml/frlrfsystemwindowsformskeysclasstopic.asp) but even though
> Microsoft flagged it with a FlagsAttribute I can not OR the values

This enum is a bit tricky. The lower part is the key code, the upper part
contains bits that indicate whether Shift, Control or Alt are pressed,
and only these upper bits can be or-ed. They key codes are masked by
Keys.KeyCode, and the upper bits (Shift, Ctrl, Alt) are masked by the
Keys.Modifiers value.

-- 
Rudy Velthuis
"I'll moider da bum."
-- Heavyweight boxer Tony Galento, when asked what he thought of William
   Shakespeare


Relevant Pages

  • RE: VB code symbol for Alt key? ie cntl=^
    ... DOWN ARROW ... To specify keys combined with any combination of the SHIFT, CTRL, and ALT ... precede the key code with one or more of the following codes: ...
    (microsoft.public.access.macros)
  • Re: ASM Sequence to signextend
    ... arithmetic and logical shift operations. ... Typically, sign-extension means the remaining upper bits (i.e., bits 31 ... compiler is GCC based, then, yeah, GCC adds in additional code to correct ... lots of shifts, register moves, and logical-and's to force the "char" to the ...
    (alt.lang.asm)
  • Re: ODD PROBLEM: "Shift-S" Doesnt work for upper case "S" Mac Mini
    ... The only way to make an upper case "S" is to use the Caps ... and the "Shift S" problem remained. ... been working around this problem with the Caps Lock key since she got ...
    (comp.sys.mac.system)
  • Re: ODD PROBLEM: "Shift-S" Doesnt work for upper case "S" Mac Mini
    ... The only way to make an upper case "S" is to use the Caps ... and the "Shift S" problem remained. ... been working around this problem with the Caps Lock key since she got ...
    (comp.sys.mac.system)
  • Re: newbie questions text code...
    ... At this time, DI contains whatever AX did, could be any hex value from ... This instruction sets AH to, AL still contains the original 8 bits it ... The other version of the right shift is the arithmetic right ... But the upper eight bits of DI ...
    (comp.lang.asm.x86)