How to activate the Windows Virtual Keyboard from eXpress

This forum is for eXpress++ general support.
Message
Author
User avatar
Auge_Ohr
Posts: 1406
Joined: Wed Feb 24, 2010 3:44 pm

Re: How to activate the Windows Virtual Keyboard from eXpres

#21 Post by Auge_Ohr »

hi,
rdonnay wrote:Here is an OSK sample program.
how to resize ... it is to big (full-HD)

if i turn my Table PC 90" ( Landscape -> Portrait ) how to (automatic) resize OSK :?:
greetings by OHR
Jimmy

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: How to activate the Windows Virtual Keyboard from eXpres

#22 Post by digitsoft »

Thanks Roger
Excellent work, but when I put it with a DCSAY GET it does not work

rdonnay wrote:Here is an OSK sample program.
Attachments
OSK.rar
(3.04 KiB) Downloaded 719 times
Nolberto Paulino
Regards

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: How to activate the Windows Virtual Keyboard from eXpres

#23 Post by digitsoft »

YES
Auge_Ohr wrote:
digitsoft wrote:This example does not work
are you running under 64 Bit ?
Nolberto Paulino
Regards

User avatar
Auge_Ohr
Posts: 1406
Joined: Wed Feb 24, 2010 3:44 pm

Re: How to activate the Windows Virtual Keyboard from eXpres

#24 Post by Auge_Ohr »

so you need to disable Redirection to WOW64.
Attachments
OSK64.ZIP
Source Code using ot4xb Syntax
(783 Bytes) Downloaded 717 times
greetings by OHR
Jimmy

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: How to activate the Windows Virtual Keyboard from eXpres

#25 Post by digitsoft »

hello Roger
He modifies his example of OSK, and now it is for any DCGET that falls with just a click.
Now I do not understand why when I'm typing the data, for example, NOLBERTO in the Dialog screen, NOLBERTO is shown, but if I look for the data of the Variable that DCGET has, it only has NOLBERT.

Please, tell me how I can fix it
Attachments
Captura.JPG
Captura.JPG (80.6 KiB) Viewed 12140 times
OSK.rar
(4.34 KiB) Downloaded 688 times
Nolberto Paulino
Regards

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: How to activate the Windows Virtual Keyboard from eXpres

#26 Post by rdonnay »

Please, tell me how I can fix it
That code I gave you was very preliminary.
I wanted to see if you had intentions to use it before I invested more time in this.
Now, I can see that you want to use it so I will help you.

You have done some very nice work and I can see that you understand it well.
You made a very simple error. You forgot to assign GETOBJECT oGet2

Code: Select all

@ 06.2,00.0 DCSAY "Get2:"  GET cGet2 PICT "@!k" ;
   KEYBLOCK {|k,b,o| KeySeek( k, o,cGet2 ) } GETOBJECT oGet2
Nice work on using the Handler to reassign ::targetXbp.
It works very well.

I made another change to your code to prevent the keyboard from exiting when clicking "ENTER".

Code: Select all

@ DCGUI_ROW, DCGUI_COL+nSpace DCPUSHBUTTONXP CAPTION 'Enter' SIZE nKeySize*2,nKeySize  ;
   ACTION {||::accum(Chr(xbeK_ENTER),'',GetList)} ;
   ;// DC_ReadGuiEvent(DCGUI_EXIT_ABORT,GetList)} ;
   ;// ACTION {||DC_ReadGuiEvent(DCGUI_EXIT_ABORT,GetList)} ;
   ACCELKEY xbeK_ENTER ;
   OBJECT oCancelButton  CONFIG ::buttonConfig
The eXpress train is coming - and it has more cars.

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: How to activate the Windows Virtual Keyboard from eXpres

#27 Post by digitsoft »

Thank you
Roger
On the other hand, you can send me to my Personal Mail when my subscription expires, to renew it at the end of the year.
Nolberto Paulino
Regards

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: How to activate the Windows Virtual Keyboard from eXpres

#28 Post by rdonnay »

I edited my last posting with some more information for you.
The eXpress train is coming - and it has more cars.

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: How to activate the Windows Virtual Keyboard from eXpres

#29 Post by digitsoft »

Thanks Hise what I indicated and the problem was still happening, but you
add this line ::targetXbp:Keyboard( xbeK_ENTER ) && 22-12-2018 Nolberto Paulino
and problem Solved.

Now Work Great, I'll adapt it to use the Teclaco just like the Phone.


rdonnay wrote:I edited my last posting with some more information for you.
Nolberto Paulino
Regards

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: How to activate the Windows Virtual Keyboard from eXpres

#30 Post by rdonnay »

I like the mods you made to the keyboard.
Resizing it made it work better for the KIOSK program.

I also made a few more mods so the ENTER key would automatically move to the next GET.

When a GET receives focus, the background color is changed so the user knows it is the target.

In this application I need to keep the keyboard ALWAYSONTOP so it would not get hidden if touching the form.

Code: Select all

STATIC FUNCTION TouchHandler( nEvent, mp1, mp2, oXbp, oDlg, GetList, oOsk )

LOCAL i, oObj, oParent, aChildList

IF Valtype(oXbp) == 'O' .AND. oXbp:isDerivedFrom('DC_XbpGet')
  IF nEvent == xbeP_SetInputFocus
    oXbp:setColorBG(GRA_CLR_CYAN)
    oXbp:setColorFG(GRA_CLR_DARKRED)
    oOsk:targetXbp := oXbp
    oParent := oOsk:targetXbp:setParent()
    aChildList := oParent:childList()
    FOR i := 1 TO Len(aChildList)
      oObj := aChildList[i]
      IF oObj:isDerivedFrom('DC_XbpGet') .AND. oObj # oXbp
        oObj:setColorBG(GRA_CLR_WHITE)
        oObj:setColorFG(GRA_CLR_BLACK)
      ENDIF
    NEXT
  ENDIF
  IF !oOSK:isVisible()
    oOSK:show()
  ENDIF
ENDIF

RETURN DCGUI_NONE

Code: Select all

METHOD TouchKeyboard:Accum( cKey, cCapsKey )

LOCAL cBuffer, i

IF ::isCapsLock .AND. !Empty(cCapsKey)
  cKey := cCapsKey
ENDIF

::targetXbp:updated := .T.
FOR i := 1 TO Len(cKey)
  ::targetXbp:Keyboard( ASC(cKey[i]) )
NEXT

IF ::targetXbp:isDerivedFrom('DC_XbpGet')
   cBuffer := Transform ( ::targetXbp:Get:Buffer, IIf(::targetXbp:Picture==NIL, "", ::targetXbp:picture) )
   ::targetXbp:Get:_assign( )
   ::targetXbp:SetEditBuffer( cBuffer )
ENDIF

IF Asc(cKey) == xbeK_ENTER
  SetAppFocus(::targetXbp)
  PostAppEvent(xbeP_Keyboard, xbeK_ENTER,,::targetXbp)
ENDIF

Sleep(1)

RETURN nil
kiosk.jpg
kiosk.jpg (253.22 KiB) Viewed 12111 times
The eXpress train is coming - and it has more cars.

Post Reply