KeyPad

KeyPad

Postby pablovidal » Sun Nov 15, 2009 3:34 pm

Esto es un Teclado Numerico Virtual:

Image

Code: Select all  Expand view

/*
Tecla Numerico Virtual
Pablo Vidal
*/

Function KeyPad()
Local nResultado := 0
Local oDlg
Local oSay
Local uTemp := "0"
Local oFnt

DEFINE FONT oFnt NAME "TAHOMA" SIZE 0, -16  BOLD

 DEFINE DIALOG oDlg FROM 0,0 TO 185, 175 Title "KeyPad" Pixel

  @ 005, 005 Say oSay Prompt {|| Transform( Val( uTemp ),"999,999,999,999.99" ) } RIGHT SIZE 80, 12 OF oDlg PIXEL FONT oFnt COLOR CLR_HGREEN, CLR_BLACK

  @ 020, 005 BUTTON "7" OF oDlg SIZE 15, 15 PIXEL ACTION ( ( uTemp += "7" ), oSay:Refresh() )
  @ 020, 023 BUTTON "8" OF oDlg SIZE 15, 15 PIXEL ACTION ( ( uTemp += "8" ), oSay:Refresh() )
  @ 020, 041 BUTTON "9" OF oDlg SIZE 15, 15 PIXEL ACTION ( ( uTemp += "9" ), oSay:Refresh() )

  @ 038, 005 BUTTON "4" OF oDlg SIZE 15, 15 PIXEL ACTION ( ( uTemp += "4" ), oSay:Refresh() )
  @ 038, 023 BUTTON "5" OF oDlg SIZE 15, 15 PIXEL ACTION ( ( uTemp += "5" ), oSay:Refresh() )
  @ 038, 041 BUTTON "6" OF oDlg SIZE 15, 15 PIXEL ACTION ( ( uTemp += "6" ), oSay:Refresh() )

  @ 056, 005 BUTTON "1" OF oDlg SIZE 15, 15 PIXEL ACTION ( ( uTemp += "1" ), oSay:Refresh() )
  @ 056, 023 BUTTON "2" OF oDlg SIZE 15, 15 PIXEL ACTION ( ( uTemp += "2" ), oSay:Refresh() )
  @ 056, 041 BUTTON "3" OF oDlg SIZE 15, 15 PIXEL ACTION ( ( uTemp += "3" ), oSay:Refresh() )

  @ 074, 005 BUTTON "0" OF oDlg SIZE 33, 15 PIXEL ACTION ( ( uTemp += "0" ), oSay:Refresh() )
  @ 074, 041 BUTTON "." OF oDlg SIZE 15, 15 PIXEL ACTION ( ( uTemp += "." ), oSay:Refresh() )

  @ 020, 060 BUTTON "Back"   OF oDlg SIZE 23, 15 PIXEL ACTION ( ( uTemp := substr( uTemp, 1, Len( uTemp)-1 ) ), oSay:Refresh() )
  @ 038, 060 BUTTON "Borrar" OF oDlg SIZE 23, 15 PIXEL ACTION ( ( uTemp := "" ), oSay:Refresh() )
  @ 056, 060 BUTTON "ENTER"  OF oDlg SIZE 23, 33 PIXEL ACTION ( ( nResultado := Val( uTemp ) ), odlg:End() )

 ACTIVATE DIALOG oDlg CENTER

oFnt:End()

Return( nResultado )
 
Last edited by pablovidal on Sun Nov 15, 2009 5:00 pm, edited 1 time in total.
Saludos,

Pablo Alberto Vidal
/*
------------------------------------------------------
Harbour 3.2.0, Fivewin 17.02, BCC7
------------------------------------------------------
*/
User avatar
pablovidal
 
Posts: 401
Joined: Thu Oct 06, 2005 10:15 pm
Location: Republica Dominicana

Re: KeyPad

Postby Antonio Linares » Sun Nov 15, 2009 4:52 pm

Pablo,

Puedes poner un pantallazo de como se ve ?

gracias! :-)
regards, saludos

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

Re: KeyPad

Postby pablovidal » Sun Nov 15, 2009 5:01 pm

Image
Saludos,

Pablo Alberto Vidal
/*
------------------------------------------------------
Harbour 3.2.0, Fivewin 17.02, BCC7
------------------------------------------------------
*/
User avatar
pablovidal
 
Posts: 401
Joined: Thu Oct 06, 2005 10:15 pm
Location: Republica Dominicana


Return to FiveWin para Pocket PC

Who is online

Users browsing this forum: No registered users and 20 guests