EaBIM

标题: [即时预览] 在Jig中检测Shift和Control的按键状态 [打印本页]

作者: 萧闫子    时间: 2014-1-8 16:35
标题: [即时预览] 在Jig中检测Shift和Control的按键状态
Detecting the use of the shift and control keys during an AutoCAD jig using .NET
Another interesting little problem, that of how to detect the use of  modifier keys during a jig operation (to indicate different jig behaviour). In this case the specific task was to detect the use of the Control and Shift keys, which – if held down during the jig – should cause our object to display differently.
I started with the code from this previous post which uses a DrawJig to place text in the plane of the screen during the jig operation. I initially thought I’d have to use a message filter (as shown in this previous post), but I eventually realised it wasn’t needed: it’s simply a matter of querying the state of System.Windows.Forms.Control.ModifierKeys at the appropriate moment during our WorldDraw().
Here’s the C# code

复制代码



作者: 教父    时间: 2014-3-10 13:28
顶起来…………
作者: dison    时间: 2014-3-11 11:09
谢谢老师…
作者: 车奴    时间: 2014-3-11 11:19
楼主辛苦……
作者: dison    时间: 2014-3-11 11:20
谢谢老师…
作者: 月の月    时间: 2014-3-14 11:19
顶...... 楼下跟上.....
作者: bin    时间: 2014-3-14 11:22
顶起来…………
作者: 车奴    时间: 2014-3-14 11:29
顶起来…………
作者: 飞天舞    时间: 2014-3-14 11:33
顶!!!!!!!!!!
作者: 妮可    时间: 2014-4-28 14:48
顶!!!!!!!!!!!!!!!!!!!!!!!!!
作者: 秦惑    时间: 2014-5-13 10:20
路过!!! 不发表意见……
作者: 国产008    时间: 2014-5-13 10:26
路过!!! 帮顶……
作者: codywu    时间: 2014-5-13 10:26
(*^__^*) 嘻嘻……
作者: 嫣雨遥    时间: 2014-5-22 15:21
顶!!!!!!!!!!
作者: 黑超BB    时间: 2014-5-22 15:26
顶!!!!!!!!!!




欢迎光临 EaBIM (https://eabim.net/) Powered by Discuz! X3.2