NumLock,CapsLock,Inset / Overwrite [英] NumLock, CapsLock, Inset/Overwrite

查看:114
本文介绍了NumLock,CapsLock,Inset / Overwrite的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


在VB.Net中如何确定CapsLock是否开启/关闭(NumLock相同)和

是否输入模式设置为插入或覆盖(插入键)。我只是

为我的应用添加了一个状态栏,我想反映这三个
项目的状态(类似于Word,Excel等)我''我发现每个键的关键枚举值为

,但我不知道如何判断状态是否开启等等。


TIA

Lee

解决方案



http://groups.google.be /groups?hl=nl...&meta=group%3D
microsoft.public.dotnet.languages.vb。*


请注意,当您复制粘贴时,。* als需要包含在链接中,

但是不希望这样做


彼得


" lgbjr" < LG *** @ online.nospam> schreef in bericht

news:uR ************** @ TK2MSFTNGP14.phx.gbl ...

大家好,

在VB.Net中,我如何确定CapsLock是否开启/关闭(NumLock相同)和
输入模式是否设置为Insert或Overwrite(Insert Key)。我只是在我的应用程序中添加了一个状态栏,我想反映这些
三个项目的状态(类似于Word,Excel等)我找到了关键的枚举值$ b每把钥匙都是$ b,但我不知道怎么判断州是否开/关等等。

TIA
Lee



彼得,


感谢您的链接。我找到了我正在寻找的信息(实际上超过了我真正想要的
!)。我添加了代码来查看我想要的键的状态

。暂时,我已经创建了一个按钮并将代码放在

按钮单击事件中。因此,当我单击按钮时,状态栏显示每个键的

状态。到目前为止一切都很好。


现在,我如何或者我在哪里放置代码以便它不断检查这些密钥的状态

。显然,我不想点击按钮来查看

状态。如果用户打开NumLock,我希望在状态栏中捕获并显示事件




我以为我可以使用状态栏按键事件,但这并不是
似乎工作,或者至少我没有正确地做到这一点。


TIA

Lee


" Peter Proost" < PP ***** @ nospam.hotmail.com>在消息中写道

news:OU ************** @ TK2MSFTNGP10.phx.gbl ...


http://groups.google.be/groups?hl=nl...&meta=group%3D
microsoft.public.dotnet.languages.vb。* <记住,当你复制粘贴时,。* als需要包含在链接中
它,
但是你不会这样做

彼得

lgbjr < LG *** @ online.nospam> schreef in bericht
新闻:uR ************** @ TK2MSFTNGP14.phx.gbl ...

大家好,
输入模式是否设置为Insert或Overwrite(Insert Key)。我只是在我的应用程序中添加了状态栏,我想反映这些


三个

项目的状态(类似于Word,Excel等。我找到了

每个键的关键枚举器值
,但我不知道如何判断状态是否开启等等。

TIA
Lee






您可以将表单的'keypreview设置为true然后始终在表单keydown或keyup事件中运行您的代码




hth


Greetz Peter


" lgbjr" < LG *** @ online.nospam> schreef in bericht

新闻:#I ************* @ TK2MSFTNGP14.phx.gbl ...

Peter,
感谢您的链接。我找到了我正在寻找的信息(实际上比我真正想要的更多
!)。我添加了代码来查看我想要的
键的状态。我暂时创建了一个按钮,并将代码放在
按钮点击事件中。因此,当我单击按钮时,状态栏会显示每个键的状态。到目前为止一切都很好。

现在,我如何或者在哪里放置代码,以便它不断检查
这些密钥的状态。显然我不想点击按钮看州
。如果用户打开NumLock,我想要捕获事件并在状态栏中显示


我以为我可以使用状态栏按键事件,但那不是<似乎工作,或者至少我做得不好。

TIA


彼得·普罗斯特 < PP ***** @ nospam.hotmail.com>在消息中写道
新闻:OU ************** @ TK2MSFTNGP10.phx.gbl ...


http://groups.google.be/groups?hl=nl...&meta=group%3D microsoft.public.dotnet.languages.vb。*

介意当你复制粘贴时,。* als需要被包含在链接中
它,
但是你不会这样做

彼得

" lgbjr" < LG *** @ online.nospam> schreef in bericht
新闻:uR ************** @ TK2MSFTNGP14.phx.gbl ...

大家好,
以及输入模式是否设置为Insert或Overwrite(Insert Key)。我
刚刚为我的应用添加了一个状态栏,我想反映这些


三个

项目的状态(类似于Word,Excel等。我找到了

每个键的关键枚举器


值,但我不知道如何判断状态是否开启等等。

TIA
Lee





Hi All,

In VB.Net how do I determine if CapsLock is on/off (same for NumLock) and
whether the input mode is set to Insert or Overwrite (Insert Key). I just
added a status bar to my app, and I want to reflect the state of these three
items (similar to Word, Excel, etc.) I''ve found the key enumerator value for
each key, but I don''t know how to tell if the state is on/off, etc.

TIA
Lee

解决方案

Hi,

http://groups.google.be/groups?hl=nl...&meta=group%3D
microsoft.public.dotnet.languages.vb.*

Mind that the .* als need to be included in the link when you copy paste it,
but oe won''t do this

hth Peter

"lgbjr" <lg***@online.nospam> schreef in bericht
news:uR**************@TK2MSFTNGP14.phx.gbl...

Hi All,

In VB.Net how do I determine if CapsLock is on/off (same for NumLock) and
whether the input mode is set to Insert or Overwrite (Insert Key). I just
added a status bar to my app, and I want to reflect the state of these three items (similar to Word, Excel, etc.) I''ve found the key enumerator value for each key, but I don''t know how to tell if the state is on/off, etc.

TIA
Lee



Peter,

Thanks for the link. I found the info I was looking for (actually more than
what I really wanted!). I''ve added the code to look at the state of the keys
that I want. and temporarily, I''ve created a button and put the code in the
button click event. So, when I click the button, the status bar shows the
state of each of the keys. All good so far.

Now, how do I, or where do I, put the code so that it continually checks for
the state of these keys. Obviously I don''t want to click a button to see the
state. If the user turns on NumLock, I want the event captured and displayed
in the status bar.

I thought I could just use the status bar keypress event, but that doesn''t
seem to work, or at least I''m not doing it properly.

TIA
Lee

"Peter Proost" <pp*****@nospam.hotmail.com> wrote in message
news:OU**************@TK2MSFTNGP10.phx.gbl...

Hi,

http://groups.google.be/groups?hl=nl...&meta=group%3D
microsoft.public.dotnet.languages.vb.*

Mind that the .* als need to be included in the link when you copy paste
it,
but oe won''t do this

hth Peter

"lgbjr" <lg***@online.nospam> schreef in bericht
news:uR**************@TK2MSFTNGP14.phx.gbl...

Hi All,

In VB.Net how do I determine if CapsLock is on/off (same for NumLock) and
whether the input mode is set to Insert or Overwrite (Insert Key). I just
added a status bar to my app, and I want to reflect the state of these


three

items (similar to Word, Excel, etc.) I''ve found the key enumerator value


for

each key, but I don''t know how to tell if the state is on/off, etc.

TIA
Lee




Hi,

you could set the form''s keypreview to true and then always run your code
in the forms keydown or keyup event

hth

Greetz Peter

"lgbjr" <lg***@online.nospam> schreef in bericht
news:#I*************@TK2MSFTNGP14.phx.gbl...

Peter,

Thanks for the link. I found the info I was looking for (actually more than what I really wanted!). I''ve added the code to look at the state of the keys that I want. and temporarily, I''ve created a button and put the code in the button click event. So, when I click the button, the status bar shows the
state of each of the keys. All good so far.

Now, how do I, or where do I, put the code so that it continually checks for the state of these keys. Obviously I don''t want to click a button to see the state. If the user turns on NumLock, I want the event captured and displayed in the status bar.

I thought I could just use the status bar keypress event, but that doesn''t
seem to work, or at least I''m not doing it properly.

TIA
Lee

"Peter Proost" <pp*****@nospam.hotmail.com> wrote in message
news:OU**************@TK2MSFTNGP10.phx.gbl...

Hi,

http://groups.google.be/groups?hl=nl...&meta=group%3D microsoft.public.dotnet.languages.vb.*

Mind that the .* als need to be included in the link when you copy paste
it,
but oe won''t do this

hth Peter

"lgbjr" <lg***@online.nospam> schreef in bericht
news:uR**************@TK2MSFTNGP14.phx.gbl...

Hi All,

In VB.Net how do I determine if CapsLock is on/off (same for NumLock) and whether the input mode is set to Insert or Overwrite (Insert Key). I just added a status bar to my app, and I want to reflect the state of these


three

items (similar to Word, Excel, etc.) I''ve found the key enumerator

value for

each key, but I don''t know how to tell if the state is on/off, etc.

TIA
Lee





这篇关于NumLock,CapsLock,Inset / Overwrite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆