Setting Component focus


Recommended Posts

Hi,

I read a previous topic #4465 regarding setting edit component focus using speedkey. When I do this the component is selected (as if for editing) even in run time mode. Is this correct behaviour? Is there a way of setting focus using the speedkey that is same as clicking mouse on component.

Using latest 5.86 in Win7

Regards

Andrew

Link to comment
Share on other sites

My quest for a more generic/integrated way of handling custom onscreen keyboard.

I have built a dll that's a DF friendly wrapper for Win32 API call SendInput, which allows me to send a key press to the buffer. So far so good. My master plan was to popup the custom keyboard whenever an edit box was selected, however the edit box looses focus as soon as I press a button or popup a window.

Do the edit boxes, and other components, have a windows handle/id?. Maybe I can set focus through the Win API? If I can programmatically set focus through the dll function, then I only have to worry about passing some kind of id from calling object in DF. Hmm, starting to get complicated.

I know, I know there are easier ways that have been discussed on these forums and I have the system basically working using these methods, but doesn't stop me trying. I'd ultimately like to be able to just set a startup flag enabling on screen keyboard so the coding and GUI is the same with/without attached keyboard. If I get it working I'll happily post dll for anyone who's interested.

Regards

Andrew

Link to comment
Share on other sites

First, you do know, of course that there is a built in on-screen keyboard? Second, you know there are commercially available, customizable onscreen keyboards you could use that handle all these issues. DAQFactory doesn't really expose low level handles well enough for you to reliably try and hook into it from a DLL.

Link to comment
Share on other sites

Have tried the built-in keyboard, but have small screen and it isn't suitable.

After quick search found several promising 3rd party keyboards. Aaaargh, now I feel silly. It was an interesting excercise anyway.

If you have any recommendations please pass on.

Regards

Andrew

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.