VB.Net中的KeyDown? [英] KeyDown in VB.Net?

查看:380
本文介绍了VB.Net中的KeyDown?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只知道VB 6中的keydown事件,它是这样的:


Private Sub Form_KeyUp(KeyCode As Integer,Shift As Integer)

如果KeyCode = 13那么

XXXXXXXXXXX

结束如果


如何在VB.Net中执行此操作?我可以这样做覆盖其他设置吗?


非常感谢!

解决方案

嗨Sven,


查看关键字,更容易使用。


我希望这有帮助吗?


Cor

我只知道VB 6中的keydown事件,它是这样的:

Private Sub Form_KeyUp(KeyCode As Integer,Shift如整数)
如果KeyCode = 13则
XXXXXXXXXXX
结束如果

如何在VB.Net中执行此操作?我可以这样做覆盖其他设置吗?



谢谢


" Cor" < no*@non.com> schrieb im Newsbeitrag

新闻:%2 **************** @ TK2MSFTNGP11.phx.gbl ...

嗨Sven ,

看看关键字,更容易使用。

我希望这有帮助吗?

Cor
< blockquote class =post_quotes>我只知道VB 6中的keydown事件,它是这样的:

Private Sub Form_KeyUp(KeyCode As Integer,Shift As Integer)
如果KeyCode = 13然后
XXXXXXXXXXX
结束如果

如何在VB.Net中执行此操作?我可以覆盖其他设置吗?




Sven,


Form类公开KeyDown事件。您可以在Windows窗体设计器中为此

事件添加处理程序。传递的事件参数很少比传递给VB6的事件更复杂,请参考

MSDN的示例和更详细的信息。


-

Dmitriy Lapshin [C#/ .NET MVP]

X-Unity测试工作室
http://x-unity.miik.com.ua/teststudio.aspx

将单元测试的强大功能带到VS .NET IDE


" Sven" < f是氟烃基;在消息新闻中写道:eB ************* @ TK2MSFTNGP11.phx.gbl ...

我只知道VB 6中的keydown事件,那里是像这样:

Private Sub Form_KeyUp(KeyCode As Integer,Shift As Integer)
如果KeyCode = 13那么
XXXXXXXXXXX
结束如果
我怎么能在VB.Net中这样做?我能否覆盖其他设置呢?

非常感谢!




I only know the keydown-event in VB 6, there it is like this:

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
XXXXXXXXXXX
End If

How can I do this in VB.Net? can I do this overriding other settings?

Thanks a lot!

解决方案

Hi Sven,

Have a look for the keyup, that is more easy to use.

I hope this helps?

Cor

I only know the keydown-event in VB 6, there it is like this:

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
XXXXXXXXXXX
End If

How can I do this in VB.Net? can I do this overriding other settings?



Thanks

"Cor" <no*@non.com> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...

Hi Sven,

Have a look for the keyup, that is more easy to use.

I hope this helps?

Cor

I only know the keydown-event in VB 6, there it is like this:

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
XXXXXXXXXXX
End If

How can I do this in VB.Net? can I do this overriding other settings?




Sven,

The Form class exposes the KeyDown event. You can add a handler for this
event in the Windows Forms designer. The event arguments passed are little
bit more complex than those passed to the VB6 counterpart, please refer to
MSDN for examples and more detailed information.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Sven" <f> wrote in message news:eB*************@TK2MSFTNGP11.phx.gbl...

I only know the keydown-event in VB 6, there it is like this:

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
XXXXXXXXXXX
End If

How can I do this in VB.Net? can I do this overriding other settings?

Thanks a lot!




这篇关于VB.Net中的KeyDown?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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