Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keypress event not firing
Message
 
 
To
05/05/2005 19:13:54
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01011173
Message ID:
01011554
Views:
16
I didn't hear anything about SP1 for VFP9 yet.

>Thanks for replying
>
>I suspect this is a bug.
>
>In my base form class I have the following code.
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>
>IF thisform.FunctionKeyPress(m.nKeyCode, m.nShiftAltCtrl)
>	NODEFAULT
>ENDIF
>
>in my base form class FunctionKeyPress I have
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>
>LOCAL lNodefault as Boolean
>m.lNodefault = .T.
>WITH thisform
>	DO CASE
>	CASE nKeyCode = 21		&& F1
>		.ShowHelp(.ActiveControl)
>	CASE nKeyCode = -7		&& F8
>		IF .ResolveConflicts(.T.)
>			.Release()
>		ENDIF	
>	CASE nKeyCode = 27		&& ESC
>		.Release()
>	OTHERWISE
>		m.lNodefault = .F.
>	ENDCASE
>ENDWITH
>RETURN m.lNodefault
>
>in my derived forms I overload FunctionKeyPress with similar code but generally
>
>	DO CASE
>	CASE ...
>	CASE ...
>	CASE DODEFAULT(m.nKeyCode, m.nShiftAltCtrl)	&& -- Standard Hot keys
>	OTHERWISE
>	ENDCASE
>
>If I have KeyPreview = .F. in the base class but set it in my derived form the keypress event of my controls is not fired.
>
>As soon as I set KeyPreview = .T. in the base form class, it works properly.
>
>This is not a biggy as I should really have it set in my base form class anyway.
>
>I'm not sure what they have done with the event handling in VFP9. I had to place all my controls in a container to make the initialisation event sequence work properly. You probably remember the bug I reported earlier.
>
>Do you have any idea when a service pack will be available?
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform