Jump to content
Fivewin Brasil

bkeydown no get


jose hilton

Recommended Posts

Boa tarde a todos

Pessoal estou com um pequeno Probleminha que esta

mim deixando de cabelo branco

Estou usando o bkeydown mais a variavel esta chegando ao seu destino vazia veja o codigo

function cheCkusu()

LOCAL oget3

local m_pass:="",M_AUX

oTimermsg:Deactivate()

Priv CSENHA := SPACE(6) , Tent := 0,oMsg,uRetorno := .f. ,odlg

xCodUsu:= space(3)

xNomUsu:=Space(30)

select usuario

oGet30:hide()

oGet32:hide()

oGet31:hide()

oGet13:Hide()

oGet24:Hide()

priv uGet1

vGet1 := 'OPERADOR:'

priv uGet2,xCodusu := space(3)

Priv uGet3,vGet3:= 'DIGITE A SENHA:'

Priv uGet4,cSenha := space(6)

priv uGet5,cMsge := ''

define dialog odlg resource 'PedeSenha' of od FONT AFONT[1] ;

Color nRgb(255,255,255),nRgb(102,102,255)

Redefine Get uGet1 Var vGet1 id 4001 of odlg update FONT AFONT[1] when .f.;

Color nRgb(255,255,255),nRgb(255,80,37)

uGet1:lDisColors:=.f.

redefine get uGet2 Var xCodUsu id 4002 Picture "999" of

odlg update FONT AFONT[1];

Color nRgb(255,255,255),nRgb(255,80,37)

uget2:bkeydown := {|nkey| iif(nKey=VK_RETURN,pEGuSU(),NIL)}

redefine Get uGet3 var vGet3 id 4003 Update of odlg FONT AFONT[1] when .f.;

Color nRgb(255,255,255),nRgb(255,80,37)

uGet3:lDisColors:=.f.

Redefine Get uGet4 Var cSenha ID 4004 of odlg update FONT AFONT[1]; // valid verusu(odlg)

Color nRgb(255,255,255),nRgb(255,80,37)

uGet4:bkeydown := {|nkey,bflags| IIF(NKEY = VK_RETURN ,VERUSU(NKEY,oDlg),NIL)}

redefine get uget5 Var cMsgE id 4005 of Odlg update FONT AFONT[1] when .f. ;

Color nRgb(255,255,255),nRgb(255,80,37)

uGet5:lDisColors:=.f.

activate dialog Odlg when ! uRetorno on Init(uGet3:Hide(),uGet4:hide(),xSetFocus(uGet2),uGet2:Refresh(),ChecaSituacao())

Function PegUsu()

Dbselectarea("USUARIO")

GO TOP

LOCATE FOR USUARIO->CODUSU = xCodUsu //aqui esta meu

problema o xcodusu esta vazio

como como faco para resolver isso

If !FOUND()

cMsgE:="USUÃRIO NÃO CADASTRADO ."

IF AGUARDANDOENTER(CMSGE)

ENDIF

CMSGE:=''

Tent ++

cDescr := "Tentativas Restantes " + Str(3 - tent ,2)

oGet7:Refresh()

xCodUsu := Space(3)

if Tent > 2

uRetorno := .f.

Dbcloseall()

odlg:end()

ownd:end()

Quit

endif

odlg:Update()

Odlg:Update()

sysrefresh()

Odlg:Update()

Return .f.

endif

Grato Hilton

josehiltonribeiro@hotmail.com

fwh32 11.12 xhb 1.2

pelles 6.0

Link to comment
Share on other sites

Boa tarde a todos

Pessoal estou com um pequeno Probleminha que esta

mim deixando de cabelo branco

Estou usando o bkeydown mais a variavel esta chegando ao seu destino vazia veja o codigo

function cheCkusu()

LOCAL oget3

local m_pass:="",M_AUX

oTimermsg:Deactivate()

Priv CSENHA := SPACE(6) , Tent := 0,oMsg,uRetorno := .f. ,odlg

xCodUsu:= space(3)

xNomUsu:=Space(30)

select usuario

oGet30:hide()

oGet32:hide()

oGet31:hide()

oGet13:Hide()

oGet24:Hide()

priv uGet1

vGet1 := 'OPERADOR:'

priv uGet2,xCodusu := space(3)

Priv uGet3,vGet3:= 'DIGITE A SENHA:'

Priv uGet4,cSenha := space(6)

priv uGet5,cMsge := ''

define dialog odlg resource 'PedeSenha' of od FONT AFONT[1] ;

Color nRgb(255,255,255),nRgb(102,102,255)

Redefine Get uGet1 Var vGet1 id 4001 of odlg update FONT AFONT[1] when .f.;

Color nRgb(255,255,255),nRgb(255,80,37)

uGet1:lDisColors:=.f.

redefine get uGet2 Var xCodUsu id 4002 Picture "999" of

odlg update FONT AFONT[1];

Color nRgb(255,255,255),nRgb(255,80,37)

uget2:bkeydown := {|nkey| iif(nKey=VK_RETURN,pEGuSU(),NIL)}

redefine Get uGet3 var vGet3 id 4003 Update of odlg FONT AFONT[1] when .f.;

Color nRgb(255,255,255),nRgb(255,80,37)

uGet3:lDisColors:=.f.

Redefine Get uGet4 Var cSenha ID 4004 of odlg update FONT AFONT[1]; // valid verusu(odlg)

Color nRgb(255,255,255),nRgb(255,80,37)

uGet4:bkeydown := {|nkey,bflags| IIF(NKEY = VK_RETURN ,VERUSU(NKEY,oDlg),NIL)}

redefine get uget5 Var cMsgE id 4005 of Odlg update FONT AFONT[1] when .f. ;

Color nRgb(255,255,255),nRgb(255,80,37)

uGet5:lDisColors:=.f.

activate dialog Odlg when ! uRetorno on Init(uGet3:Hide(),uGet4:hide(),xSetFocus(uGet2),uGet2:Refresh(),ChecaSituacao())

Function PegUsu()

Dbselectarea("USUARIO")

GO TOP

LOCATE FOR USUARIO->CODUSU = xCodUsu //aqui esta meu

problema o xcodusu esta vazio

como como faco para resolver isso

If !FOUND()

cMsgE:="USUÃRIO NÃO CADASTRADO ."

IF AGUARDANDOENTER(CMSGE)

ENDIF

CMSGE:=''

Tent ++

cDescr := "Tentativas Restantes " + Str(3 - tent ,2)

oGet7:Refresh()

xCodUsu := Space(3)

if Tent > 2

uRetorno := .f.

Dbcloseall()

odlg:end()

ownd:end()

Quit

endif

odlg:Update()

Odlg:Update()

sysrefresh()

Odlg:Update()

Return .f.

endif

Grato Hilton

josehiltonribeiro@hotmail.com

fwh32 11.12 xhb 1.2

pelles 6.0

Link to comment
Share on other sites

  • 10 months later...

   cHoraBrasil := ( "http://www.horariodebrasilia.org/" )
 
   REDEFINE BUTTON oHoraBrasil ID 993 OF oDlg ;
            ACTION( ShellExecute(GetActiveWindow(),"open",'"'+cHoraBrasil+'"'), XFOCUS( oCbx[1] ) )
 
   oHoraBrasil:cToolTip := OemToAnsi( "Site Que Mostra a Hora Exata de Brasilia" )
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...