Ver Mensaje Individual
  #5  
Antiguo 08-05-2013
jonydread jonydread is offline
Miembro
NULL
 
Registrado: nov 2011
Posts: 157
Reputación: 13
jonydread Va por buen camino
hise lo sgte.
en login cree un archivo que guarda el usuario que inicia
Código Delphi [-]
procedure TLoginform.BitBtn1Click(Sender: TObject);
var
temp:TStringList;
path: string;
begin
path := ExtractFilePath(Application.ExeName);
if not UsuarioValido(ComboBox1.Text,Edit1.Text) then
  begin
     MessageDlg('Usuario no existe', mtError, [mbcancel],0);
end else

temp := TStringList.Create;
temp.Add(ComboBox1.Text);
temp.Add(Edit1.Text);
temp.SaveToFile(path+'\user.tmp');
 ModalResult := mrOK;
end;
end.
el nombre lo cargue en un label e ise lo sgte. en el boton del menu agregar
Código Delphi [-]
procedure TMainform.AgregarClick(Sender: TObject);
begin
   if label2.Caption = 'Admin' then
   begin
   Application.CreateForm(Tadminform, Adminform);

   SetAsMainForm(Adminform);

   Adminform.show;

   mainform.Close;
   end else
   showmessage('no tiene permisos')
end;

Saludos.
Responder Con Cita