VK-Key nach xbeK_*
Verfasst: Di, 17. Jul 2018 11:25
hi,
wenn man in Explorer einen Buchstaben eingibt springt er auf das Element (wenn es ein Treffer gibt)
das passiert nicht "automatisch" sondern wird durch den LVN_ODFINDITEM Notify Event eingeleitet.
ein andere Möglichkeit ist der LVN_KEYDOWN Notify Event wo man auch Fx Tasten verarbeiten kann.soweit so gut ... aber es klappt nur wenn man ALT drückt, wartet ... und dann Fx Taste drückt
jemand eine Idee wie man das richtig hin bekommt
wenn man in Explorer einen Buchstaben eingibt springt er auf das Element (wenn es ein Treffer gibt)
das passiert nicht "automatisch" sondern wird durch den LVN_ODFINDITEM Notify Event eingeleitet.
ein andere Möglichkeit ist der LVN_KEYDOWN Notify Event wo man auch Fx Tasten verarbeiten kann.
Code: Alles auswählen
METHOD DXE_ArrayView:OnKEYDOWN(o,lp)
LOCAL st := NMLVKEYDOWN():New()
STATIC nLast := 0
st:_link_(lp,.F.)
nKey := st:wVKey
* msgbox(var2char(nKey))
CASE nKey = VK_SHIFT ; nLast := nKey // 16
CASE nKey = VK_CONTROL ; nLast := nKey // 17
CASE nKey = VK_MENU ; nLast := nKey // 18 ALT
CASE nKey >= 112 .AND. nKey <= 123 // F1-F12
DO CASE
CASE nLast = VK_CONTROL
PostAppEvent( xbeP_Keyboard, 589824+nKey ,, self:setParent() )
CASE nLast = VK_MENU
PostAppEvent( xbeP_Keyboard, 327680+nKey ,, self:setParent() )
CASE nLast = VK_SHIFT
PostAppEvent( xbeP_Keyboard, 196608+nKey ,, self:setParent() )
OTHERWISE
PostAppEvent( xbeP_Keyboard, 65536+nKey ,, self:setParent() )
ENDCASE
nLast = 0
jemand eine Idee wie man das richtig hin bekommt