jose hilton Posted April 15, 2012 Report Share Posted April 15, 2012 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 Quote Link to comment Share on other sites More sharing options...
jose hilton Posted April 15, 2012 Author Report Share Posted April 15, 2012 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 Quote Link to comment Share on other sites More sharing options...
joaosolution Posted April 15, 2012 Report Share Posted April 15, 2012 Hilton Tente pegar o buffer do get uGet2:oGet:buffer No lugar do xCodUsu. Att João Bosco Contagem/MG FWH 10.6b xHb 1.2.1 WorkShop 4.5 PellesC SQLLIB SQLRDD xDev MySql MS-Sql Quote Link to comment Share on other sites More sharing options...
jose hilton Posted April 15, 2012 Author Report Share Posted April 15, 2012 Muito obrigado Joao Busco deu certo Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 7, 2013 Report Share Posted March 7, 2013 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" ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.