从快捷方式获取密钥 [英] Get Keys from a ShortCut
本文介绍了从快捷方式获取密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
还有另外一种从快捷方式获取密钥的方法
Is there another way of getting the Keys from a Shortcut besides
sc的类型为 System.Windows.Forms.Shortcut
var k = (Keys)sc;
我需要为每个键使用单独的字符串,并且由于我使用的是Progress ABL .NET网桥(请不要问),因此上述方法不起作用.
I need the separate strings for each of the keys and the above won't work since I'm using a Progress ABL .NET bridge (don't ask).
我认为 sc
应该是整数,但是显然在.NET中,这行代码可以正常工作.
I thought sc
should be an integer, but apparently in .NET this line of code works fine.
推荐答案
ABL中的示例:
USING Progress.Util.TypeHelper FROM ASSEMBLY.
USING System.Enum FROM ASSEMBLY.
USING System.Windows.Forms.Keys FROM ASSEMBLY.
USING System.Windows.Forms.Shortcut FROM ASSEMBLY.
DEFINE VARIABLE ShortCut AS ShortCut NO-UNDO.
DEFINE VARIABLE Keys_ AS Keys NO-UNDO.
ShortCut = System.Windows.Forms.Shortcut:CtrlShiftF1.
Keys_ = CAST(Enum:ToObject(TypeHelper:GetType("System.Windows.Forms.Keys"), ShortCut:value__), Keys).
MESSAGE Keys_
VIEW-AS ALERT-BOX.
这篇关于从快捷方式获取密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文