Sorry, i realize this is probably the wrong forum / wrong site but i like this community and am sure you can help!
I am currently trying to work out the way some of the APIs in windows work. The literature is somewhat confusing but i think this is mostly due to the fact I'm new to it.
So:
This is a user posted Usage from msdn, Visual Basic 9, I am using the visual basic editor in powerpoint so not sure if this is right
i understand the reason for the if statement, (which i dont need) but can anyone explain the rest?what do the &H8000US bits mean, these have cropped up elsewhere too, but not too sure what the are, is it just a value recognised by windows and how do i find out what this value is for VBA?I have not seen the Get function before, leading me to believe i have actually got non compatiable code here in which case any help on how to implement it for VBA?why ReadOnly?, what does this do?why no Set in the declaration?is Keys.LButton recognized through the API?, or is this from VB, Sorry for this badly worded questions, i hope someone can help a little but google isn't helping a huge amount at the moment
I am currently trying to work out the way some of the APIs in windows work. The literature is somewhat confusing but i think this is mostly due to the fact I'm new to it.
So:
This is a user posted Usage from msdn, Visual Basic 9, I am using the visual basic editor in powerpoint so not sure if this is right
Rich (BB code):
Rich (BB code):
Public Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As Int32) As UShort ''(i have used ...ByVal vKey As Long) As Integer here as mentioned in another post on this forum
Public Shared ReadOnly Property KeyStatus(ByVal Key As Keys) As Boolean
Get
If Key = Keys.LButton AndAlso My.Computer.Mouse.ButtonsSwapped Then
Key = Keys.RButton
ElseIf Key = Keys.RButton AndAlso My.Computer.Mouse.ButtonsSwapped Then
Key = Keys.LButton
End If
Return API.Devices.GetAsyncKeyState(Key) And &H8000US
End Get
End Property