Ingenieria en informática
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...
Regístrate para leer el documento completo.