Input Panel Gesture

Re: Input Panel Gesture

Postby Otto » Tue Feb 16, 2010 9: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
Image

Code: Select all  Expand view


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
//----------------------------------------------------------------------------//


 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6010
Joined: Fri Oct 07, 2005 7:07 pm

Re: Input Panel Gesture

Postby Bayron » Tue Feb 16, 2010 9: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
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Input Panel Gesture

Postby Antonio Linares » Tue Feb 16, 2010 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Input Panel Gesture

Postby Bayron » Tue Feb 16, 2010 9:41 am

Sr Linares,

Grandioso, como siempre justo a tiempo....

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

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

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Input Panel Gesture

Postby Bayron » Tue Feb 16, 2010 10:07 am

Antonio,

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

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

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Input Panel Gesture

Postby Antonio Linares » 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: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Input Panel Gesture

Postby Bayron » Tue Feb 16, 2010 1: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
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Input Panel Gesture

Postby Antonio Linares » Tue Feb 16, 2010 1:46 pm

Bayron,

Puedes probar este código e indicarme que valor te muestra en pantalla ? gracias
Code: Select all  Expand view

   local hTabTip := CreateProcess( "tabtip" )

   MsgInfo( hTabTip )
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Input Panel Gesture

Postby Bayron » Tue Feb 16, 2010 1:56 pm

Solamente el texto tabtip

Image
=====>

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

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Input Panel Gesture

Postby Antonio Linares » Tue Feb 16, 2010 2:49 pm

Bayron,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Input Panel Gesture

Postby Bayron » Tue Feb 16, 2010 3: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


Image
=====>

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

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Previous

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 87 guests