Ver Mensaje Individual
  #2  
Antiguo 02-02-2008
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 22
cHackAll Va por buen camino
Guarda las preguntas en un TStrings (Ej. TListBox.Items)... y utiliza las funciones Randomize y Random para obtener 5 al azar.

Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var Left, Index: Cardinal;
begin
 Left := 5;
 Randomize;
 while LongBool(Left) do
  begin
   Index := Random(ListBox1.Count);
   ShowMessage(ListBox1.Items[Index]);
//   ListBox1.Items.Delete(Index); // para no repetir...
   Dec(Left);
  end;
end;
Responder Con Cita