???? ID: 320584 - ????? ???????: 04 ?????? 2010 - ??????: 2.0 ???????? ??? ??????????? ?? ????? C# ?? ????? ???? trap ???? ????
?? ????? ?????????? ??? ?? ??? ???? ????????? ???? ?? ?? Windows ??????? ???????? ??? ??????????? trap ???? ????? ?? ??? ??? ????? ??? ?? ????? ??, ?? ?? ???? ???-??? ????????? intercept ?? ???? ???? ?? ????? ??????, CTRL ?? ALT intercept ?? ?? ???? ???? ?? ????? ?????? ??????? ????? ?????? ???? ??? ??? ??, ??? ??????????? ?? ???????? ????????, ???? ???? ??? ??????? ?? CD-ROM ??? ?????? ????????? ???????? ?? ??? ???????? ?? ?? ???? ?? ? ??????? ??????? ????????, ???? ?? ???KeyUp,KeyDown, ??KeyPress????? ?????? ?? ??????????? ?? ????? ???? ?? ??? ???????? ???? ???????, ??? ???????? ??? ?????? ?? ??????? ??? ??????????? ?? ??? ?? ??????? ???? ?????? ?? ???, ?? ????? ????DataGrid????????: ??? ??? ???? ????? ?? ??? ????? ???? ???, ??? ???????? (LEFT ARROW, RIGHT ARROW, UP ???, ?? ???? ???) ??????? ????KeyUp?????? ???? ????????, ???? ??? ?? 4, ??? ??? ????? ???? ???DataGrid????, ??? ???? ???????? ???????? ???????? ?? ??? ????? ????? ?? ??? ??? ??????? ??? ????????? ??? ?? ???? ???????? ?? 4 ??? ????? ???? ???, ???? ???KeyUp, ?? ??? ??? ?????, ?? ???? ?? ???? ???????? ??? ????? ?? ??? ??? ?? ???????????? ??? ?? ???????? ?? ?????? ?? ???? ??????????? ?? ?????? ???? ?? ??? ?? ???? ??? ??? ????? ?? ???? ?? ???? ???? ?? ???? ??? ??? ????? ?? ??? ????? ???? ?? ??? ???? ?? ???DataGrid, ???????DataGrid???????? ?? ??? ?? ?? ?????? ?? ????? ???????? ??? ?? ???? .NET ???????? ?? ??? ???? approach ?? ????? ?? ???? ??? ????? Trap ??? ????Trap ??????????? ?? ???? Windows ??????? ???????? ??? ??, ?? ??? ???? ???????? ?? ?? ?? ????? ???, ?? ?? ??????? ?? ???? ?? ?????? ?? ??? ???? derive ???? ?????ProcessCmdKey?????? ??? ?? overridden ?????? ??? trap ???? ????? ??? ?? ??????????? ?? ??????? ???? ?? ??? ??? ???? ????? ????? ????? ??? ?? ?? ??? ???? ?? ??? ??????? ?????? ?? ?? ?????? ??:Implement the Overridden MethodThe system passes two parameters to theProcessCmdKey????:msg, ??keyData. Themsgparameter contains the Windows Message, such as WM_KEYDOWN. ThekeyDataparameter contains the key code of the key that was pressed. If CTRL or ALT was also pressed, thekeyDataparameter contains the ModifierKey information.?? ????? ????msgparameter is not mandatory; you can ignore it. It is good practice, however, to test the message. In this example, you test WM_KEYDOWN to verify that this is a keystroke event. ?? ?? ??????? WM_SYSKEYDOWN, ????? ???????? ???????? (??????? ALT ?? CTRL) ????? ????????? ???????? ??? ???? ???? ??? ??????? ???????? trap, ?? ??? ?? keyCode ???? ?? ??? ?? ????? ?? ??? ????????? ?? ???????????????? ????? ??? ????? ????????? ???? ?? ?? ???? UP ???, ???? ???, TAB, CTRL + M, ?? ALT + Z ??????????? ??? ???? ?? ???: ?? ?????? ?????????? ?????? ?? ??? ??????????? trap ???? ?????? ??DataGrid???????? ???
???? ???? ???? ??:
???? ?????? ??????????????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??. ?????????? ?? ??????? ????????? ??????? ??:320584
(http://support.microsoft.com/kb/320584/en-us/
)
| ???? ?????? ???? ?????? ??????
????????? ?????? ??????? ???????? ??????
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email

????? ?? ???? ????
