Ver Mensaje Individual
  #4 (permalink)  
Antiguo 02/01/2009, 15:27
Avatar de Peterpay
Peterpay
Colaborador
 
Fecha de Ingreso: septiembre-2007
Ubicación: San Francisco, United States
Mensajes: 3.858
Antigüedad: 16 años, 8 meses
Puntos: 87
Respuesta: ¿Como utilizar el Random en Windows Forms (version 2005)?

Random r= gcnew Random();
int valor=r.Next(1,10);
numeros_t->Text=valor.ToString(); (numeros_t es un text box)


al ser vc++ y el usar gcnew puede darte un error raro pero prueba esto

Random^ r= gcnew Random();
int valor=r->Next(1,10);
numeros_t->Text=valor.ToString(); (numeros_t es un text box)
__________________
Curso WF4
http://cursos.gurudotnet.com/ DF
Aprende HTML5

Última edición por Peterpay; 02/01/2009 a las 15:38