Ingenieria en informática

Páginas: 3 (656 palabras) Publicado: 16 de septiembre de 2012
Cachipun , Visual Studio.

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim valor, mio AsInteger
mio = 1
Dim path As String
valor = CInt((Rnd() * 2) + 1)

path = "C:\Documents and Settings\132720649\Escritorio\piedra.jpg"
foto1.Image =Image.FromFile(path)

If valor = 1 Then
path = "C:\Documents and Settings\132720649\Escritorio\piedra.jpg"
foto2.Image = Image.FromFile(path)
End IfIf valor = 2 Then
path = "C:\Documents and Settings\132720649\Escritorio\papel.jpg"
foto2.Image = Image.FromFile(path)
End If
If valor = 3 Thenpath = "C:\Documents and Settings\132720649\Escritorio\tijera.jpg"
foto2.Image = Image.FromFile(path)
End If

If mio = 1 And valor = 3 ThenLabel1.Text = "gana jugador 1"
End If
If mio = 2 And valor = 1 Then
Label1.Text = "gana jugador 1"
End If
If mio = 3 And valor = 2 ThenLabel1.Text = "gana jugador 1"
End If
If (mio = 1 And valor = 1) Or (mio = 2 And valor = 2) Or (mio = 3 And valor = 3) Then
Label1.Text = "Empate"
End IfIf mio = 1 And valor = 2 Then
Label1.Text = "gana jugador 2"
End If
If mio = 2 And valor = 3 Then
Label1.Text = "gana jugador 2"
End IfIf mio = 3 And valor = 1 Then
Label1.Text = "gana jugador 2"
End If



End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button2.Click
Dim valor, mio As Integer
mio = 2
Dim path As String
valor = CInt((Rnd() * 2) + 1)

path = "C:\Documents and...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • ingenieria informatica
  • Ingenieria Informatica
  • Ingenieria informatica
  • ingenieria informatica
  • Ingenieria En Informatica
  • Ingenieria Informatica
  • Ingenieria informatica
  • Ingenierio en informática

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS