FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Input Panel Gesture
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: Input Panel Gesture

Posted: Tue Feb 16, 2010 09:19 AM
Hello Bayron,
I don’t understand exactly why you have to call tabtip.exe.

What I do is like that. I use a build in keyboard.
Here is my code for the num-keyboard.
Best regards,
Otto


Code (fw): Select all Collapse
function f_menge( oDlgRg, cAbbruch)
   LOCAL oBtn1
   LOCAL oBtn2
   LOCAL oBtn3
   LOCAL oBtn4
   LOCAL oBtn5
   LOCAL oBtn6
   LOCAL oBtn7
   LOCAL oBtn8
   LOCAL oBtn9
   LOCAL oBtn0
   LOCAL oBtn11
   LOCAL oBtnEnd
   LOCAL oDlg
   LOCAL lSave     := .f.
   LOCAL oSay
   LOCAL cNummer   := "1        "
   LOCAL lStart    := .t.
   *--------------------------------------------

   if eof()=.f.
      IF lisch->rgnr = 1
         msginfo("Mengenänderung nicht erlaubt")
         RETURN nil
      ENDIF

      if left(lisch->artnum,4) ="G__E"  .OR. left(lisch->artnum,4) ="G__A"
         msginfo("Bei Gutschein Mengenänderung nicht erlaubt")
         RETURN nil
      ENDIF

      DEFINE DIALOG oDlg ;
         TITLE "Menge "+ left(lisch->bezeichnun,25) +" "+str(lisch->preis) ;
         COLOR 0, val(Setup():FarbeMenge)     ;
         FROM 1,45 TO 32,95 ;
         STYLE WS_CAPTION

      @ 0,10 say oSay PROMPT cNummer of oDlg font Setup():oFntdISPLAY

      oSay:SetText(cNummer)
      oSay:refresh()

      @ 2, 1      SBUTTON oBtn1 PROMPT "1"  OF oDlg  ACTION  (IIF( lstart=.t.,(lStart:=.f., cNummer:=""), ) , cNummer:=cNummer+"1", oSay:SetText(cNummer),oSay:refresh() )   SIZE 38, 38 FONT Setup():oFntBrowser  COLORS CLR_WHITE,RGB(44,72,93) ,  CLR_WHITE  CRYSTAL
      @ 2, 8.9    SBUTTON oBtn2 PROMPT "2"  OF oDlg  ACTION  (IIF( lstart=.t.,(lStart:=.f., cNummer:=""), ) , cNummer:=cNummer+"2", oSay:SetText(cNummer),oSay:refresh() )   SIZE 38, 38 FONT Setup():oFntBrowser  COLORS CLR_WHITE,RGB(44,72,93) ,  CLR_WHITE  CRYSTAL
      @ 2, 16.5   SBUTTON oBtn3 PROMPT "3"  OF oDlg  ACTION  (IIF( lstart=.t.,(lStart:=.f., cNummer:=""), ) , cNummer:=cNummer+"3", oSay:SetText(cNummer),oSay:refresh() )   SIZE 38, 38 FONT Setup():oFntBrowser  COLORS CLR_WHITE,RGB(44,72,93) ,  CLR_WHITE  CRYSTAL

      @ 5, 1      SBUTTON oBtn4 PROMPT "4"  OF oDlg  ACTION  (IIF( lstart=.t.,(lStart:=.f., cNummer:=""), ) , cNummer:=cNummer+"4", oSay:SetText(cNummer),oSay:refresh() )   SIZE 38, 38 FONT Setup():oFntBrowser  COLORS CLR_WHITE,RGB(44,72,93) ,  CLR_WHITE  CRYSTAL
      @ 5, 8.9    SBUTTON oBtn5 PROMPT "5"  OF oDlg  ACTION  (IIF( lstart=.t.,(lStart:=.f., cNummer:=""), ) , cNummer:=cNummer+"5", oSay:SetText(cNummer),oSay:refresh() )   SIZE 38, 38 FONT Setup():oFntBrowser  COLORS CLR_WHITE,RGB(44,72,93) ,  CLR_WHITE  CRYSTAL
      @ 5, 16.5   SBUTTON oBtn6 PROMPT "6"  OF oDlg  ACTION  (IIF( lstart=.t.,(lStart:=.f., cNummer:=""), ) , cNummer:=cNummer+"6", oSay:SetText(cNummer),oSay:refresh() )   SIZE 38, 38 FONT Setup():oFntBrowser  COLORS CLR_WHITE,RGB(44,72,93) ,  CLR_WHITE  CRYSTAL

      @ 8, 1      SBUTTON oBtn7 PROMPT "7"  OF oDlg  ACTION  (IIF( lstart=.t.,(lStart:=.f., cNummer:=""), ) , cNummer:=cNummer+"7", oSay:SetText(cNummer),oSay:refresh() )   SIZE 38, 38 FONT Setup():oFntBrowser  COLORS CLR_WHITE,RGB(44,72,93) ,  CLR_WHITE  CRYSTAL
      @ 8, 8.9    SBUTTON oBtn8 PROMPT "8"  OF oDlg  ACTION  (IIF( lstart=.t.,(lStart:=.f., cNummer:=""), ) , cNummer:=cNummer+"8", oSay:SetText(cNummer),oSay:refresh() )   SIZE 38, 38 FONT Setup():oFntBrowser  COLORS CLR_WHITE,RGB(44,72,93) ,  CLR_WHITE  CRYSTAL
      @ 8, 16.5   SBUTTON oBtn9 PROMPT "9"  OF oDlg  ACTION  (IIF( lstart=.t.,(lStart:=.f., cNummer:=""), ) , cNummer:=cNummer+"9", oSay:SetText(cNummer),oSay:refresh() )   SIZE 38, 38 FONT Setup():oFntBrowser  COLORS CLR_WHITE,RGB(44,72,93) ,  CLR_WHITE  CRYSTAL

      @ 11, 8.9   SBUTTON oBtn0 PROMPT "0"  OF oDlg  ACTION  (IIF( lstart=.t.,(lStart:=.f., cNummer:=""), ) , cNummer:=cNummer+"0", oSay:SetText(cNummer),oSay:refresh() )   SIZE 38, 38 FONT Setup():oFntBrowser  COLORS CLR_WHITE,RGB(44,72,93) ,  CLR_WHITE  CRYSTAL
      @ 11, 1     SBUTTON oBtn0 PROMPT ","  OF oDlg  ACTION  (IIF( lstart=.t.,(lStart:=.f., cNummer:=""), ) , cNummer:=cNummer+".", oSay:SetText(cNummer),oSay:refresh() )   SIZE 38, 38 FONT Setup():oFntBrowser  COLORS CLR_WHITE,RGB(44,72,93) ,  CLR_WHITE  CRYSTAL

      @ 2, 26     SBUTTON oBtnEnd PROMPT "Abbruch"      OF oDlg  ACTION   (lSave := .f.,oDlg:END())                                           SIZE 38, 38 FONT Setup():oFntBrowser  COLORS CLR_WHITE,RGB(44,72,93) ,  CLR_WHITE  CRYSTAL
      @ 5, 26     SBUTTON oBtnEnd PROMPT "Clear"        OF oDlg  ACTION   (cNummer := "",oSay:SetText(cNummer),oSay:refresh())                SIZE 38, 38 FONT Setup():oFntBrowser  COLORS CLR_WHITE,RGB(44,72,93) ,  CLR_WHITE  CRYSTAL
      @ 8 ,26     SBUTTON oBtnEnd PROMPT "Speichern"    OF oDlg  ACTION   (cNummer := AllTRim(oSay:GetText(cNummer)),lSave:=.t.,oDlg:END())    SIZE 55, 55 FONT Setup():oFntBrowser  COLORS CLR_WHITE,RGB(44,72,93) ,  CLR_WHITE  CRYSTAL

      ACTIVATE DIALOG oDlg  ON INIT   (cNummer := "1",oSay:SetText(cNummer),oSay:refresh())

      if (val(cNummer)) > 999
         cNummer := ""
         lSave   := .F.
         msginfo( "Menge zu groß" + CRLF + "Max. € 999")

      elseif  val(cNummer)  =0
         cNummer := ""
         lSave   := .F.
         msgAlert("keine Menge eingegeben","Vorsicht")

      else
         if lSave=.T.
            select lisch
            RLOK()
            REPLACE lisch->menge WITH val(cNummer)
            REPLACE lisch->wert  WITH lisch->menge * lisch->preis
            UNLOK()
        
          else
             cAbbruch :=" Abbruch"
    
          ENDIF
   endif

endif
RETURN nil
//----------------------------------------------------------------------------//
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM

Re: Input Panel Gesture

Posted: Tue Feb 16, 2010 09:24 AM

Otto,
I don't HAVE TO CALL THE KEYBOARD, is just that the keyboard is active, and it shows a pad when a get is tap once and access it when it is tap twice, I just do not want to have a keyboard in screen and the user to accidently invoke another one....

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Input Panel Gesture

Posted: Tue Feb 16, 2010 09:30 AM

Bayron,

En FWH\samples\EndApp.prg tienes un ejemplo de cómo terminar una aplicación sabiendo el título de su ventana principal.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM

Re: Input Panel Gesture

Posted: Tue Feb 16, 2010 09:41 AM

Sr Linares,

Grandioso, como siempre justo a tiempo....

Ya son las 4:40 AM y todavia estaba con google....

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM

Re: Input Panel Gesture

Posted: Tue Feb 16, 2010 10:07 AM

Antonio,

Acabo de encontrar que el Titulo de ventana no existe.....

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Input Panel Gesture

Posted: Tue Feb 16, 2010 11:08 AM
Bayron,

Aqui tienes un ejemplo de como hacerlo sin usar el título de la ventana de la aplicación:
Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

   local hCalc := CreateProcess( "calc" )

   MsgInfo( "calc running" )

   TerminateProcess( hCalc )

return nil

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>

HB_FUNC( CREATEPROCESS )
{
   STARTUPINFO StartupInfo;
   PROCESS_INFORMATION ProcessInfo;
   DWORD dwExitCode;

   memset( ( char * ) &StartupInfo, 0, sizeof( STARTUPINFO ) );
   StartupInfo.cb = sizeof( StartupInfo );
   StartupInfo.dwFlags = STARTF_USESHOWWINDOW;
   StartupInfo.wShowWindow = ( hb_pcount() > 1 ) ? hb_parni( 2 ) : SW_SHOWNA;
   CreateProcess( 0, ( char * ) hb_parc( 1 ), 0, 0, FALSE,
                  CREATE_NEW_CONSOLE | NORMAL_PRIORITY_CLASS,
                  0, 0, &StartupInfo, &ProcessInfo );
   hb_retnl( ( LONG ) ProcessInfo.hProcess );                                 
}

HB_FUNC( TERMINATEPROCESS )
{
   hb_retl( TerminateProcess( ( HANDLE ) hb_parnl( 1 ), hb_parnl( 2 ) ) );
}   

#pragma ENDDUMP

tags: CreateProcess TerminateProcess
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM

Re: Input Panel Gesture

Posted: Tue Feb 16, 2010 01:32 PM

Antonio,

Gracias por las funciones, ellas trabajan perfectamente con la Calculadora, pero no funcionan con Tabtip, el teclado continua visible aun despues de intentar Terminar el Proceso...

Talvez tenga que ver con el hecho de que cuando se cierra el teclado, este no termina, sino simplemente se minimiza en el lado derecho de la pantalla...pero en nuestro caso, el teclado no reacciona a la orden de terminar...

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Input Panel Gesture

Posted: Tue Feb 16, 2010 01:46 PM
Bayron,

Puedes probar este código e indicarme que valor te muestra en pantalla ? gracias
Code (fw): Select all Collapse
   local hTabTip := CreateProcess( "tabtip" )

   MsgInfo( hTabTip )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM

Re: Input Panel Gesture

Posted: Tue Feb 16, 2010 01:56 PM
Solamente el texto tabtip

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Input Panel Gesture

Posted: Tue Feb 16, 2010 02:49 PM

Bayron,

Puedes revisar tu código del ejemplo ? CreateProcess() devuelve un número...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM

Re: Input Panel Gesture

Posted: Tue Feb 16, 2010 03:09 PM
Antonio,

Perdon, tenia un error en el codigo del MsgInfo(),

me da un numero diferente cada vez que lo activo,

primero me dio 504, despues 508, 524, 536,544,552

sali del programa y reingrese y me dio 404, despues 416, 420


=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Continue the discussion