- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
Module MyChrModule
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
'49 to 57 Chr , 32 space
Public Function Mychr(ByVal ChrNumber As Long) As String
If ChrNumber = 1 Then Mychr = "[LMB]"
If ChrNumber = 2 Then Mychr = "[RMB]"
If ChrNumber = 4 Then Mychr = "[MMB]" ' MouseMiddleButton ( Scroll button )
If ChrNumber = 9 Then Mychr = "[Tab]"
If ChrNumber = 20 Then Mychr = "[CapsLock]"
If ChrNumber = 160 Then Mychr = "[LeftShift]"
If ChrNumber = 162 Then Mychr = "[LeftCtrl]"
If ChrNumber = 192 Then Mychr = "`"
If ChrNumber = 112 Then Mychr = "[F1]" '112 to 123
If ChrNumber = 113 Then Mychr = "[F2]"
If ChrNumber = 114 Then Mychr = "[F3]"
If ChrNumber = 115 Then Mychr = "[F4]"
If ChrNumber = 116 Then Mychr = "[F5]"
If ChrNumber = 117 Then Mychr = "[F6]"
If ChrNumber = 118 Then Mychr = "[F7]"
If ChrNumber = 119 Then Mychr = "[F8]"
If ChrNumber = 120 Then Mychr = "[F9]"
If ChrNumber = 121 Then Mychr = "[F10]"
If ChrNumber = 122 Then Mychr = "[F11]"
If ChrNumber = 123 Then Mychr = "[F12]"
If ChrNumber = 189 Then Mychr = "-"
If ChrNumber = 187 Then Mychr = "="
If ChrNumber = 220 Then Mychr = "\"
If ChrNumber = 219 Then Mychr = "["
If ChrNumber = 221 Then Mychr = "]"
If ChrNumber = 186 Then Mychr = ";"
If ChrNumber = 220 Then Mychr = "\"
If ChrNumber = 222 Then Mychr = "'"
If ChrNumber = 188 Then Mychr = ","
If ChrNumber = 190 Then Mychr = "."
If ChrNumber = 191 Then Mychr = "/"
If ChrNumber = 8 Then Mychr = "[BckSpc]"
If ChrNumber = 123 Then Mychr = "[F12]"
If ChrNumber = 13 Then Mychr = "[Enter]"
If ChrNumber = 161 Then Mychr = "[RightShift]"
If ChrNumber = 91 Then Mychr = "[LeftLogo]"
If ChrNumber = 92 Then Mychr = "[RightLogo]"
If ChrNumber = 93 Then Mychr = "[RMB Key]"
If ChrNumber = 163 Then Mychr = "[RightCtrl]"
If ChrNumber = 164 Then Mychr = "[LeftAlt]"
If ChrNumber = 165 Then Mychr = "[RightAlt]"
If ChrNumber = 44 Then Mychr = "[Print]"
If ChrNumber = 19 Then Mychr = "[Pause]"
If ChrNumber = 45 Then Mychr = "[Insert]"
If ChrNumber = 36 Then Mychr = "[Home]"
If ChrNumber = 33 Then Mychr = "[PageUp]"
If ChrNumber = 46 Then Mychr = "[Delete]"
If ChrNumber = 35 Then Mychr = "[End]"
If ChrNumber = 34 Then Mychr = "[PageDown]"
If ChrNumber = 37 Then Mychr = "[Left]"
If ChrNumber = 38 Then Mychr = "[Up]"
If ChrNumber = 39 Then Mychr = "[Right]"
If ChrNumber = 40 Then Mychr = "[Down]"
If ChrNumber = 144 Then Mychr = "[NumLock]"
'...
striker 13.08.2009 14:31 # 0
guest 01.12.2009 00:07 # 0
КГ/АМ, патамушта не знает про Select Case. :P
psina-from-ua 01.12.2009 20:40 # 0
вместо кучи ифов Chr(ChrNumber) ...
[/quote]
megaprogrammer001 13.08.2009 15:14 # 0
Oleg_quadro 13.08.2009 17:21 # 0
Oleg_quadro 24.08.2009 00:42 # 0
guest 01.12.2009 00:09 # 0
guest 24.11.2009 19:53 # 0
Dictionary chKeys = new Dictionary<long, string>();
private void InitKeys() {
chKeys[1] = "[LMB]";
chKeys[2] = "[RMB]";
//...
}
public GetMyChr(long chrNumber) As String{
if (chKeys.ContainsKey(chrNumber))
return chKeys[chrNumber];
return "Fuck You!";
}
guest 29.11.2009 02:14 # 0
guest 07.01.2010 23:51 # 0
Не надо только C/C++ а том меня стошнит!
guest 02.06.2010 07:04 # 0
guest 26.11.2009 22:29 # 0
guest 29.11.2009 02:13 # 0