Visual Basic.NET - graficos cuatro en linea

 
Vista:

graficos cuatro en linea

Publicado por fernando gomez (1 intervención) el 13/05/2014 18:10:33
Hola alquien me podría echar una mano con este código que a la hora de correr el programa funcióna pero no jala los graficos. mi tablero es una matriz y esta echa para el juego de conecta cuatro de las bolitas de color azul o roja(el programa corre bien sale si ganaste) pero las bolitas no bajan ni siquiera aparecen.

Gambas class file

Public tablero As New Object[]
Public negra As New Picture
Public ficha As String
Public contador As Byte
Public roja As New Picture
Public azul As New Picture
acabo As Boolean
fila As Byte
fila1 As Byte
fila2 As Byte
fila3 As Byte
fila4 As Byte
fila5 As Byte

Public Sub form_open()
Dim cx As Short
Dim cy As Short
Dim x As Byte
Dim y As Byte
fila = 5
fila1 = 5
fila2 = 5
fila3 = 5
fila4 = 5
fila5 = 5
negra.load("negra.png")
roja.load("roja.png")
azul.load("azul.png")
tablero.resize(36)
For x = 0 To 5
tablero[x] = New Object[](6)
Next

cy = 70
For x = 0 To 5
cx = 45
cy = cy + 64
For y = 0 To 5
cx = cx + 64
tablero[x][y] = New PictureBox(Me) As "celda" creo aquí esta el error)

tablero[x][y].Border = Border.none
tablero[x][y].X = cx
tablero[x][y].Y = cy
tablero[x][y].Width = 64
tablero[x][y].Height = 64
tablero[x][y].picture = negra
Next
Next

End


Public Sub Boton1_Click()
Dim x As Byte
Dim y As Byte

contador = contador + 1

If tablero[5][0].Picture = negra Then
If contador Mod 2 <> 0 Then
tablero[5][0].Picture = roja
Else If contador Mod 2 = 0 Then
tablero[5][0].Picture = azul
End If
Else
fila = fila - 1
If contador Mod 2 <> 0 Then
tablero[fila][0].Picture = roja
Else If contador Mod 2 = 0 Then
tablero[fila][0].Picture = azul
End If
End If

'horizontal
For x = 0 To 5
If tablero[x][0].picture = roja And tablero[x][1].picture = roja And tablero[x][2].picture = roja And tablero[x][3].picture = roja Then
message.Info("GANASTE ROJO!!!")
Else If tablero[x][1].picture = roja And tablero[x][2].picture = roja And tablero[x][3].picture = roja And tablero[x][4].picture = roja Then
message.Info("GANASTE ROJO!!!")
Else If tablero[x][2].picture = roja And tablero[x][3].picture = roja And tablero[x][4].picture = roja And tablero[x][5].picture = roja Then
message.Info("GANASTE ROJO!!!")
End If
Next
For x = 0 To 5
If tablero[x][0].picture = azul And tablero[x][1].picture = azul And tablero[x][2].picture = azul And tablero[x][3].picture = azul Then
message.Info("GANASTE AZUL!!!")
Else If tablero[x][1].picture = azul And tablero[x][2].picture = azul And tablero[x][3].picture = azul And tablero[x][4].picture = azul Then
message.Info("GANASTE AZUL!!!")
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder