pbm_dwnkey的问题!

256m 2002-03-01 08:28:46
1、pbm_dwnkey中key不区分大小写,怎么解决?加keyflags可以判断通过shift输入大小写,不能判断Caps Lock的状态!
2、没有了。
...全文
157 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
256m 2002-03-03
  • 打赏
  • 举报
回复
谢谢两位帮我up!
zxthello 2002-03-03
  • 打赏
  • 举报
回复
up
tjm1 2002-03-03
  • 打赏
  • 举报
回复
up
256m 2002-03-02
  • 打赏
  • 举报
回复
KeyDown does not test whether CAPS LOCK or other toggle keys are in a toggled-on state, only whether the user is pressing it.
UnsignedLong by value. The modifier keys and mouse buttons that are pressed. The flags value is the sum of the values for all the pressed keys and buttons
Key and button values are:
l1 ?Left mouse button
l2 ?Right mouse button
l4 ?SHIFT key
l8 CTRL?key
l16 ?Middle mouse button

长风浪子:这就是帮助!没有用的了!我现在要的是区分大小写!
yjs_lh 2002-03-02
  • 打赏
  • 举报
回复
要验证的是Key之值.
用 asc(char(Key)) 转换就得到它的ASCII码.
KEYFLAG的内容参见PB的Help

256m 2002-03-01
  • 打赏
  • 举报
回复
在pbm_dwnkey里不管按什么键Message.WordParm都是153437736,这是怎么回事?
fzymr 2002-03-01
  • 打赏
  • 举报
回复
//ls_char为按下的键
ls_char = Char(Message.WordParm)

asc(ls_char) 为ascii码值
SeaBig 2002-03-01
  • 打赏
  • 举报
回复
KeyCodes and ASCII values
KeyDown does not distinguish between uppercase and lowercase letters or other characters and their shifted counterparts. For example, KeyA! refers to the a key梩he user may have typed "A" or "a." Key9! refers to both "9" and "(". Instead, you can test whether a modifier key is also pressed.
KeyDown does not test whether caps lock or other toggle keys are in a toggled-on state, only whether the user is pressing it.

KeyDown only detects ASCII values 65-90 (KeyA! - KeyZ!) and 48-57 (Key0!-Key9!). These ASCII values detect whether the key was pressed, whether or not the user also pressed shift or caps lock. KeyDown does not detect other ASCII values (such as 97-122 for lowercase letters).
SeaBig 2002-03-01
  • 打赏
  • 举报
回复
KeyCodes and ASCII values
KeyDown does not distinguish between uppercase and lowercase letters or other characters and their shifted counterparts. For example, KeyA! refers to the a key梩he user may have typed "A" or "a." Key9! refers to both "9" and "(". Instead, you can test whether a modifier key is also pressed.
KeyDown does not test whether caps lock or other toggle keys are in a toggled-on state, only whether the user is pressing it.

KeyDown only detects ASCII values 65-90 (KeyA! - KeyZ!) and 48-57 (Key0!-Key9!). These ASCII values detect whether the key was pressed, whether or not the user also pressed shift or caps lock. KeyDown does not detect other ASCII values (such as 97-122 for lowercase letters).
SeaBig 2002-03-01
  • 打赏
  • 举报
回复
KeyCodes and ASCII values
KeyDown does not distinguish between uppercase and lowercase letters or other characters and their shifted counterparts. For example, KeyA! refers to the a key梩he user may have typed "A" or "a." Key9! refers to both "9" and "(". Instead, you can test whether a modifier key is also pressed.
KeyDown does not test whether caps lock or other toggle keys are in a toggled-on state, only whether the user is pressing it.

KeyDown only detects ASCII values 65-90 (KeyA! - KeyZ!) and 48-57 (Key0!-Key9!). These ASCII values detect whether the key was pressed, whether or not the user also pressed shift or caps lock. KeyDown does not detect other ASCII values (such as 97-122 for lowercase letters).
256m 2002-03-01
  • 打赏
  • 举报
回复
key是枚举类型,怎么得到key的ascii码?
fzymr 2002-03-01
  • 打赏
  • 举报
回复
通过key的ascii码区分

397

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 非技术版
社区管理员
  • 非技术版社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧