Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Implementing HTMLElementEvents interface
Message
From
17/07/2018 17:39:37
 
 
To
17/07/2018 04:14:55
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Database:
MS SQL Server
Miscellaneous
Thread ID:
01661205
Message ID:
01661230
Views:
55
>>>Fred's where I started from, but since I need to do syntax coloring, not interaction with selection, those buttons are of no use in this context. I did use it before in a pet project, though.
>>>
>>>Tx, I'll take a look at Peter's stuff.
>>
>>The issue you mention is exactly one of the issues I found troublesome in Yousfi's code. Read the comments I wrote in my WBEventHandler.prg. Esp. the way Yousfi uses GetAsyncKeyState is troublesome. Instead of looping thru all 255 places, you should only test the places in the buffer that you are interested in. The code also handles ctrl, alt, shift, etc.
>
>Well thanks to Microsoft, we get no parameters in this eventhandler, so this way of poking at the buffer (and there seems to be no way to get that buffer either, eh?) seems to be the only way...
>
>I'm thinking of writing a simple js onkeyup or onkeydown handler, which would store the event parameter somewhere in the DOM and then the fox eventhandler may somehow pull it out. Not holding my breath that it may work, though.
>
>update: now I found the link in your prg, and in the C# example there it says
>private void HtmlElement1_KeyDown(Object sender, HtmlElementEventArgs e)
>
>So, ahem, the see sharp guys get the parameters and e is fully exposed, they can get its full PEM set. It's easy then. Our eventhandler is blind.

I'm not sure what you suggest. Is it that the event
PROCEDURE HTMLElementEvents_onkeydown() AS VOID
does have a parameter?

If so, what is it then? The key? Or the multiple keys? Isn't the GetAsyncKeyState() function just as powerful?

BTW, does my code work in your environment?
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform