找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 1007|回复: 0

解决菜单宏中控制符+不能正常使用(Control + letter characters in ActiveX menu ...

[复制链接]

已领礼包: 40个

财富等级: 招财进宝

发表于 2021-1-12 13:05:01 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×

问题:

Chr(94) + Chr(80) (^P) is supposed to toggle menuecho, but they are passed to
the command line as literals rather than being interpreted. When I use this, why
does " ^P_Open unknown command" occur?
Answer
There is a character code chart in MSDN that lists the different numeric ASCII
character codes that can be used for the Cntrl + Letter sequences.

The following lists these numeric codes and the associated menu macro syntax:

ASCII Character Codes
;           chr(59) Issues ENTER
^M       chr(13) Issues ENTER
^|        chr(94) + chr(124)       Issues TAB (I did not find any special number
for this)
SPACEBAR        chr(32) Enters a space; blank space between command sequences in
a menu item is equivalent to pressing the SPACEBAR
\           chr(92) Pauses for user input
_          chr(95) Translates AutoCAD commands and key words that follow
+          chr(43) Continues menu macro to the next line (if last character)
=*        chr(61) + chr(42)         Displays the current top-level image, pull-down,
or shortcut menu
*^C^C chr(42) + chr(3) + chr(3)         Prefix for a repeating item
$          chr(36) Loads a menu section or introduces a conditional DIESEL macro
expression
^B        chr(2)   Toggles Snap on or off (CTRL+B)
^C        chr(3)   Cancels command (CTRL+C)
ESC      Chr(3)  Cancels command (ESC)
^D       chr(4)   Toggles Coords on or off (CTRL+D)
^E        crh(5)   Sets the next isometric plane (CTRL+E)
^G       chr(7)   Toggles Grid on or off (CTRL+G)
^H       chr(8)   Issues backspace
^O       chr(15) Toggles Ortho on or off (CTRL+O)
^P        chr(16) Toggles MENUECHO on or off
^Q       chr(17) Echoes all prompts, status listings, and input to the printer
(CTRL+Q)
^T        chr(20) Toggles Tablet on or off (CTRL+T)
^V        chr(22) Changes current viewport (CTRL+V)
^Z        chr(26) Null character that suppresses the automatic addition of
SPACEBAR at the end of a menu item
A VBA example that demonstrates creating a Menu Item with Chr(16) in the
menumacro to toggle menuecho off, before setting the system variable PSPROLOG:

下面是VBA源码:
游客,本帖隐藏的内容需要积分高于 30 才可浏览,您当前积分为 0


论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-4-20 08:48 , Processed in 0.256940 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表