|
|
|
KeyDown
|
|||
|---|---|---|---|
|
#18+
Как реагировать на одну клавишу понятно,примеров много, а вот ка две ненайду Надо Ctrl+S Код: plaintext 1. 2. 3. 4. 5. пробовал так, реагирует только на первую (17): Код: plaintext 1. 2. 3. 4. 5. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.11.2007, 14:38 |
|
||
|
KeyDown
|
|||
|---|---|---|---|
|
#18+
KeyDown, KeyUp Events Example This example demonstrates a generic keyboard handler that responds to the F2 key and to all the associated ALT, SHIFT, and CTRL key combinations. The key constants are listed in the Visual Basic (VB) object library in the Object Browser. To try this example, paste the code into the Declarations section of a form that contains a TextBox control, and then press F5 and press F2 with various combinations of the ALT, SHIFT, and CTRL keys. Private Sub Text1_KeyDown (KeyCode As Integer, Shift As Integer) Dim ShiftDown, AltDown, CtrlDown, Txt ShiftDown = (Shift And vbShiftMask) > 0 AltDown = (Shift And vbAltMask) > 0 CtrlDown = (Shift And vbCtrlMask) > 0 If KeyCode = vbKeyF2 Then ' Display key combinations. If ShiftDown And CtrlDown And AltDown Then Txt = "SHIFT+CTRL+ALT+F2." ElseIf ShiftDown And AltDown Then Txt = "SHIFT+ALT+F2." ElseIf ShiftDown And CtrlDown Then Txt = "SHIFT+CTRL+F2." ElseIf CtrlDown And AltDown Then Txt = "CTRL+ALT+F2." ElseIf ShiftDown Then Txt = "SHIFT+F2." ElseIf CtrlDown Then Txt = "CTRL+F2." ElseIf AltDown Then Txt = "ALT+F2." ElseIf SHIFT = 0 Then Txt = "F2." End If Text1.Text = "You pressed " & Txt End If End Sub ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.11.2007, 15:13 |
|
||
|
KeyDown
|
|||
|---|---|---|---|
|
#18+
А что надо? Сочетание клавишь? Каких? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.11.2007, 15:13 |
|
||
|
KeyDown
|
|||
|---|---|---|---|
|
#18+
WorobjoffА что надо? Сочетание клавишь? Каких? Клавишь - вторая форма глагола? Как можно клавить сочетание??? Может вы имеете ввиду клавиш? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.11.2007, 15:16 |
|
||
|
KeyDown
|
|||
|---|---|---|---|
|
#18+
В моем варианте получилось так: Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. VladConn большое спасибо ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.11.2007, 15:49 |
|
||
|
|

start [/forum/topic.php?fid=60&msg=34916681&tid=2163134]: |
0ms |
get settings: |
10ms |
get forum list: |
14ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
73ms |
get topic data: |
11ms |
get forum data: |
3ms |
get page messages: |
56ms |
get tp. blocked users: |
1ms |
| others: | 222ms |
| total: | 394ms |

| 0 / 0 |
