Tema: messagebox
Ver Mensaje Individual
  #4  
Antiguo 17-08-2010
cloayza cloayza is offline
Miembro
 
Registrado: may 2003
Ubicación: San Pedro de la Paz, Chile
Posts: 947
Reputación: 25
cloayza Tiene un aura espectacularcloayza Tiene un aura espectacular
Otra forma:
Código Delphi [-]
procedure TForm1.btn1Click(Sender: TObject);
begin
  case Application.MessageBox('Desea eliminar el registro?', 'Titulo', MB_YESNO + MB_ICONQUESTION) of
    IDYES:
      begin
        //Lo que hace si clickean Si
        Table1.Delete;
      end;
    IDNO:
      begin
        //Lo que hace si clickean No
        Exit;
      end;
  end;
end;

Código Delphi [-]
if Application.MessageBox(PChar('Desea Eliminar el Registro Seleccionado'), 
                PChar('Mensaje del registro'),
                MB_YESNO + MB_ICONQUESTION + MB_DEFBUTTON1 + MB_APPLMODAL) = IDYES then
  begin
  end;

Saludos
Responder Con Cita