Re: Machile level exception
- Posted by doncole2009 Jan 23, 2009
- 1096 views
Hi Don,
I'm at work again and forgot to upload the source yesterday, I'll hope not to forget tonight.
Meanwhile, did you tried setting a returnValue() to the keydown handler?
You may find this interesting (quoted from Win32Lib documentation):
Setting returnValue at any stage causes processing to stop at the step that the value was set in, and return that value to Windows. Example:
-- prevent Button1 from seeing any space bar keys procedure Button1_KeyDown( integer self, integer event, sequence parms) integer keycode integer shift keycode = parms[1] shift = parms[2] if keycode = VK_SPACE then -- set return value returnValue( w32True ) end if end procedure setHandler( Button1, w32HKeyDown, routine_id("Button1_KeyDown"))
By the way, the number for the keys are defined in w32Keys.e, VK_F5, VK_F6
Regards,
Guillermo
Thank you Guillero,
Meanwhile, did you tried setting a returnValue() to the keydown handler?
So you mean returnValue(Button1)?
I have one prograsm that In needs returnValue(-1) or it won't work right.
I don't why.
I have another program that needs returnValue(-1) or it also works with doEvents(0).
I use doEvents(0) because it uses less typing.
What is the difference in
returnValue(-1), returnValue(0) and returnValue(1)?
I recieved you post on hooking and am studying it.
Thank you Don Cole