We can add these two modifications to any dialog.
1) Find whether it is touch screen. ( please see new tximage class)
2) If touch screen, handle invoking virtual keyboard in the gotfocus block
G. N. Rao.
Hyderabad, India
We can add these two modifications to any dialog.
1) Find whether it is touch screen. ( please see new tximage class)
2) If touch screen, handle invoking virtual keyboard in the gotfocus block
Dear Rao,
It's great, hope to see soon.
Regards,
Dutch

// Testing GETs
#include "FiveWin.ch"
#define WM_SYSCOMMAND 0x0112
#define SC_CLOSE 0xF060
function Main()
LOCAL oDlg, oGet
local oGet1, oGet2
LOCAL cCad := "Testing " // pad("Testing Gets",40)
LOCAL nNum := 0
LOCAL dDat := Date()
Set century On
Set Date Ansi
Set Date format "mm/dd/yyyy"
SET _3DLOOK ON
DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION
@ 1, 2 SAY "Text..:" OF oDlg
@ 1, 6 GET oGet VAR cCad OF oDlg SIZE 60, 10 COLOR "W/G" PICTURE "@K"
@ 1.8, 2 SAY "Number:" OF oDlg
@ 2, 6 GET oGet1 VAR nNum OF oDlg SIZE 60, 10 PICTURE "9999999.99"
@ 2.6, 2 SAY "Date:" OF oDlg
@ 3, 6 GET oGet2 VAR dDat PICTURE "@E" OF oDlg SIZE 60, 10 // "@D"
@ 3, 7 BUTTON "&Ok" OF oDlg SIZE 30, 12 ACTION .T. //oDlg:End()
@ 3, 16 BUTTON "&Cancel" SIZE 30, 12 OF oDlg ACTION oDlg:End() CANCEL
// TGet():SetColorFocus( nRGB( 200, 120, 120 ) )
ACTIVATE DIALOG oDlg CENTERED VALID ( HideInputPanel(), .T. ) ON INIT ControlsDlg( oDlg )
return nil
//------------------------------------------------------------------------//
FUNCTION ShowInputPanel( oDlg )
Local hWndInputPanel
//hWndInputPanel:= FindWindow("IPTip_Main_Window")
//if Empty( hWndInputPanel )
ShellExecute( oDlg:hWnd, "open", "C:\\Program Files\\Common Files\\microsoft shared\\ink\\tabtip.exe")
//endif
RETURN NIL
FUNCTION HideInputPanel()
Local hWndInputPanel
hWndInputPanel := FindWindow("IPTip_Main_Window")
if !Empty( hWndInputPanel )
PostMessage( hWndInputPanel, WM_SYSCOMMAND, SC_CLOSE, 0 )
endif
Return nil
Function ControlsDlg( oDlg )
Local x
Local nLen := Len( oDlg:aControls )
Local aObj := { "TGET" }
For x = 1 to nLen
if !Empty( Ascan( aObj, Upper( oDlg:aControls[x]:ClassName() ) ) )
WITH OBJECT oDlg:aControls[x]
:bGotFocus := { | o | ShowInputPanel( oDlg ) }
:bLostFocus := { | o | HideInputPanel() }
ENDWITH
endif
Next x
Return nilHello Cristobal,
thank you for the code.
I didn’t had much time for testing.
But on the first try it seems to me that every time you press a key on the virtual keyboard you loose focus of the get and do not return to the get field.
I tried to find out the logic of WINDOWS IE and it seems that you loose only focus if you click outside of a get field.
I will do some more tests tomorrow.
I had to change to c:\Windows\System32\osk.exe as I do not have ink.exe.
Best regards,
Otto
"C:\\Program Files\\Common Files\\microsoft shared\\ink\\tabtip.exe"
We can add these two modifications to any dialog.
1) Find whether it is touch screen. ( please see new tximage class)
2) If touch screen, handle invoking virtual keyboard in the gotfocus block
Dear Mr. Rao,
thank you for your work on tabtip.exe.
I did some more tests with Mr. Cristobal code.
I copied tabtip.exe to my WINDOWS 2012 Server and now it works fine.
I did some Google search on “tabtip.exe + parameters”. I think it would be fine if you could change the keyboard layout depending if the get field is a numeric or an alphanumeric field.
But it seems that you can only change the layout through registry. But maybe this is to slow for real work.
http://stackoverflow.com/questions/1564 ... ric-textbo
Cristobal, thank you for your help.
Best regards,
Otto
You can make the Windows 8.1 keyboard into extended keyboard so it has a row of numbers across the top.
Swipe from right then select the following: Settings/Change PC Settings/PC and Devices/Typing
Then turn on the option "Add the standard keyboard layout as touch keyboard option"
Then when the on-screen keyboard is displayed there will be another keyboard style option available in lower right icon.
With this keyboard layout you can press tab, alt, and function keys.
Gale FORd wrote:Check out Tabtip On-Demand. It is $1.99 and it works with any desktop app with no coding needed.
They also have a version for Remote Desktop so tablet will call local Tabtip.
http://chessware.ch/tabtipod/
Would be nice to have code inside program but I found several problems I cannot seem to overcome yet.
1. Remote Desktop and using the tablets local Tabtip. If you use the Tabtip or OSK inside RDP session it acts different than Windows 8.1 on tablet.
2. Distinguish between needing on-screen keyboard and using actual keyboard. If the tablet is in physical keyboard/docked mode, app should not show on screen keyboard.
3. There is a difference between using the mouse/keyboard/tab/arrow to enter field and using your finger/stylus to enter field. With finger or stylus you are using tablet mode and need on-screen keyboard. If you start typing on physical keyboard, on-screen keyboard should automatically hide.
4. Problems with focus. There seems to be some problems with oGet:bOnFocus starting keyboard. I can get keyboard to start but field does not act correctly at times. This may be working for other people but I can't seem to get it stable. I am also having problems getting keyboard to hide. In windows 8.1 keyboard never closes, it just hides. But I can't get it to work.
I mean to address all the problems you mentioned.
Please allow FWH team a little time.
No problem. I think it would be great to have tablet features built in. The only thing that I don't think we can manage is the Remote Desktop app with local Tabtip.