Tablet PC onscreen Keyboard

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Im trying to create a custom on screen keyboard that behaves in the same way
the tablet PC one does. ie. when shown it does not take (or change) the
focus. any buttons on this form that are pressed send the appropriate
character to the control that currently has the focus.

I think the sending of keys to the control should be quite simple using the
SendKey function, The problem Im having is how to create a form that does
not take the focus - especially when buttons on the form are pressed.

Does anyone know how to do this please? - The application is for a tablet
pc, so if there is any way of creating a custom keyboard through the tablet
pc's SDK this would be an ok solution. - though I havnt been able to find
anything on this.

Thanks in advance,

Giles.
 
Hi Giles,

Thanks for your post.

Based on my understanding, you want to create a on-screen keyboard window
in your application. Because this is a .Net Winform newsgroup, I can
provide you some advice on how to do this in .Net Winform, however, I have
not much experience on tablet pc, so I can not give you some professional
suggestion on Tablet PC.

To create a on-screen keyboard like form, there are several things we
should do:
1. Create a button class which functions normal, however do not get back
focus. This button class can be used for keyboard button.
2. Create a window which resides on the desktop does not replace the
current input window focus, such as notepad and other text editors.

To do the first one, "Iulian Ionescu" has provided a good introduction to
this, please refer to the link below:
http://groups.google.com/group/microsoft.public.dotnet.framework.windowsform
s/browse_thread/thread/9bb7bb16d321617c/1f19d5f435f7e2d1?lnk=st&q=%22on-scre
en+keyboard%22+windowsforms&rnum=5&hl=zh-CN#1f19d5f435f7e2d1

By using this button class, when we clicked the button, it will function
well, however it will not draw a focus rectangle to confuse user.

For the #2 issue, we can first assign WS_EX_TOPMOST style to form, so that
it will always on top. Then assign WS_EX_NOACTIVATE style to form. Below is
the official behavior of WS_EX_NOACTIVATE:
"A top-level window created with this style does not become the foreground
window when the user clicks it. The system does not bring this window to
the foreground when the user minimizes or closes the foreground window.
To activate the window, use the SetActiveWindow or SetForegroundWindow
function.
The window does not appear on the taskbar by default. To force the window
to appear on the taskbar, use the WS_EX_APPWINDOW style."

Hope this helps

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hi Gile,

Does my reply make sense to you? Is your problem resolved? Please feel free
to tell me, thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Jeffrey,
I read your response and it makes perfect sense. I am going to try
your solution, thank you!

AM
 
Dear Jeffery,

Sorry for the delay in replying - Ive Just been changing everything to .net
2.0.

Yes that works fine - and the reference was also helpfull.

Thanks again,

Giles.
 
Back
Top