VB6.0 代码转VB.NET

VB代码PrivateDeclareFunctionGetKeyStateLib"user32"(ByValnVirtKeyAsLong)AsIntegerPrivate... VB代码 Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) Private Declare Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyA" (ByVal wCode As Long, ByVal wMapType As Long) As Long Private Const KEYEVENTF_EXTENDEDKEY = &H1 Private Const KEYEVENTF_KEYUP = &H2 Private Sub SetKeyState(ByVal Key As Long, ByVal State As Boolean) Call keybd_event(Key, MapVirtualKey(Key, 0), KEYEVENTF_EXTENDEDKEY Or 0, 0) Call keybd_event(Key, MapVirtualKey(Key, 0), KEYEVENTF_EXTENDEDKEY Or KEYEVENTF_KEYUP, 0) End Sub Private Property GET CapsLock() As Boolean CapsLock = GetKeyState(vbKeyCapital) = 1 End Property Private Property Let CapsLock(ByVal Value As Boolean) Call SetKeyState(vbKeyCapital, Value) End Property放到VB.NET报错 展开
 我来答
匿名用户
2017-04-24
展开全部

VB.NET里面常用的两种属性定义形式,还有就是加各种修饰符的,比如readonly,writeonly等

推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式