Ver Mensaje Individual
  #7  
Antiguo 11-09-2005
Avatar de vtdeleon
vtdeleon vtdeleon is offline
Miembro
 
Registrado: abr 2004
Ubicación: RD & USA
Posts: 3.236
Reputación: 24
vtdeleon Va por buen camino
Saludos

Código Delphi [-]
    procedure TPASSWORD.OKClick(Sender: TObject);
     begin
     if trim(edit1.Text= '') then
     begin
        showmessage ('Introduzca Su Nombre De Usuario');
        edit1.SetFocus;
      end else
       if trim(edit2.Text= '') then
        begin
          showmessage ('Introduzca Su Password');
          edit2.SetFocus;
        end else
    {Esto aqui no lo entiendo, ya que esos mismo campos lo evaluaste anteriormente
    Pienso que no va.}
    {
     if (edit1.Text= '' )and (edit2.Text= '' )= true then
      principal.ShowModal;
     edit1.SetFocus;
     edit1.Text:= '';
     edit2.Text:= '';
     edit1.SetFocus;}
  //if (TBpassword.FindKey ([edit1.text]) = true ) then
   {regularmente uso Locate}
   if not TBpassword.locate('usuario;clave',VarArrayOf([edit1.text,edit2.text]),[]) then
            showmessage ('Usuario o Clave incorrecta');
         else 
           {aqui el codigo para abrir tu ventana principal}
         end;
Por ultimo has una busqueda en este foro, yaqeu se ha hablado mucho (o bastante) de este tema.
Suerte
__________________
Van Troi De León
(Not) Guía, Code vB:=Delphi-SQL, ¿Cómo?
Viajar en el tiempo no es teóricamente posible, pues si lo fuera, ya estarían aqui contándonos al respecto!

Última edición por vtdeleon fecha: 11-09-2005 a las 18:17:49.
Responder Con Cita