Private Sub tmrButtons_Tick(ByVal
sender As System.Object, ByVal
e As System.EventArgs) Handles
tmrButtons.Tick
Dim lButton
As Integer
Dim lKey1
As Integer
Dim lKey2
As Integer
lButton =
sButtons(1234567890, lKey1, lKey2)
If lButton
= 0 Then
lblButton.Text
= ""
Else
If
lKey2 = 0 Then
lblButton.Text
= ButtonName(lKey1)
Else
lblButton.Text
= ButtonName(lKey1) & " (" & ButtonName(lKey2)
& ")"
End
If
End If
End Sub
Public Function ButtonName(iButton
As Integer) As
String
Dim sName
As String = Space(1024)
sButtonName(sName, iButton)
ButtonName = StripString(sName)
End Function
Public Function StripString(sSource
As String) As
String
Dim lEnd
As Long
lEnd = InStr(sSource, Chr(0))
If lEnd >
0 Then
StripString = Mid(sSource,
1, lEnd - 1)
Else
StripString = sSource
End If
End Function |