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
// 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 nil
"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
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/
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 37 guests