jangle писал(а):Подскажите как отоловить в программе нажатие этой клавиши?
'FUNCTION WindowProc (BYVAL hWind AS LONG, BYVAL uMsg AS LONG,_
'BYVAL wParam AS LONG, BYVAL lParam AS LONG) AS LONG
' CASE %WM_KEYDOWN
' IF wParam = %VK_SHIFT THEN
' ...
' ELSEIF wParam = %VK_CONTROL THEN
' ...
' ELSEIF wParam=%VK_LEFT THEN
Function TextProc(ByVal hWnd As Dword, ByVal wMsg As Dword, ByVal wParam As Long, ByVal lParam As Long) As Long
Select Case Long wMsg
Case %WM_GETDLGCODE 'to avoid autosel on focus
Function = %DLGC_WANTCHARS Or %DLGC_WANTARROWS
Exit Function
Case %WM_KEYDOWN
Select Case Long wParam 'to avoid shift + arrow keys)
Case %VK_PRIOR To %VK_SELECT
If (GetKeyState(%VK_SHIFT) And &H8000) Then Exit Function
End Select
Case %WM_LBUTTONDBLCLK, %WM_CONTEXTMENU, %WM_PASTE, %WM_UNDO 'to avoid double-click sel
Exit Function
Case %WM_MOUSEMOVE 'to avoid mouse sel
If (wParam And %MK_LBUTTON) Then Exit Function
End Select
Function = CallWindowProc(OldTextProc, hWnd, wMsg, wParam, lParam)
End Function
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 23