Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Esto declara dos nuevas instancias de la clase Players.<br />
En el m<strong>en</strong>ú Archivo, elija Guardar todo.<br />
Para probar la clase derivada<br />
En el Explorador de soluciones, seleccione Form1 <strong>en</strong> el proyecto<br />
PlayerTest y <strong>en</strong> el m<strong>en</strong>ú Ver, elija Código.<br />
En el Editor de código, agregue el sigui<strong>en</strong>te código al procedimi<strong>en</strong>to de ev<strong>en</strong>to<br />
Form1_Load.<br />
<strong>Visual</strong> <strong>Basic</strong> Express Copiar código<br />
With player1<br />
.FirstName = "Andrew"<br />
.LastName = "C<strong>en</strong>cini"<br />
.Number = 43<br />
.Position = "Shortstop"<br />
End With<br />
With player2<br />
.FirstName = "Robert"<br />
.LastName = "Lyon"<br />
.Number = 11<br />
.Position = "Catcher"<br />
End With<br />
En el Explorador de soluciones, seleccione Form1 <strong>en</strong> el proyecto<br />
PlayerTest y <strong>en</strong> el m<strong>en</strong>ú Ver, elija Diseñador.<br />
En el Cuadro de herrami<strong>en</strong>tas, arrastre dos controles Button al formulario.<br />
Seleccione el primer control Button y <strong>en</strong> la v<strong>en</strong>tana Propiedades establezca su<br />
propiedad Text <strong>en</strong> At Bat.<br />
Seleccione el segundo control Button y <strong>en</strong> la v<strong>en</strong>tana Propiedades establezca<br />
su propiedad Text <strong>en</strong> On Deck.<br />
Haga doble clic <strong>en</strong> el primer botón (At Bat) para abrir el Editor de código y<br />
escriba el sigui<strong>en</strong>te código <strong>en</strong> el controlador de ev<strong>en</strong>tos Button1_Click.<br />
<strong>Visual</strong> <strong>Basic</strong> Express Copiar código<br />
Everts Garay | Granada, Nicaragua| Paseo por <strong>Visual</strong> <strong>Basic</strong> <strong>2008</strong> 130