Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 2nd, 2007, 6:36 PM   #1
DWk
Newbie
 
Join Date: Sep 2005
Posts: 7
Rep Power: 0 DWk is on a distinguished road
Question How to check if button was clicked already

I'm trying to make a little game in VB.Net

I'm using some buttons, but I need to check if a button was clicked.

Why? Because the buttons can only be clicked once. How can I do this?

Thanks!
DWk is offline   Reply With Quote
Old Feb 2nd, 2007, 6:56 PM   #2
Wizard1988
Professional Programmer
 
Wizard1988's Avatar
 
Join Date: Oct 2005
Location: Chitown
Posts: 422
Rep Power: 4 Wizard1988 is on a distinguished road
When the button gets clicked set the enabled property to false.
__________________

Wizard1988 is offline   Reply With Quote
Old Feb 2nd, 2007, 7:01 PM   #3
PhilBon
Hobbyist Programmer
 
PhilBon's Avatar
 
Join Date: Nov 2005
Posts: 172
Rep Power: 4 PhilBon is on a distinguished road
Send a message via AIM to PhilBon Send a message via MSN to PhilBon
First off, I'd like to say, if you haven't already read the Forum Rules, on the Right there is a link.

If you haven't looked at all the options/properties of a button I would suggest you check it out. There is one called "Enabled", this would probably solve your problem. If you want the button to always be enabled then I would suggest using a boolean Variable, and if you have multiple buttons like for Tic-Tac-Toe, then I would use an 2-D Array of boolean variables.
PhilBon is offline   Reply With Quote
Old Feb 2nd, 2007, 7:10 PM   #4
DWk
Newbie
 
Join Date: Sep 2005
Posts: 7
Rep Power: 0 DWk is on a distinguished road
Haha... that's exactly what I'm trying to do

How do you use that array of boolean variables?
DWk is offline   Reply With Quote
Old Feb 2nd, 2007, 8:01 PM   #5
PhilBon
Hobbyist Programmer
 
PhilBon's Avatar
 
Join Date: Nov 2005
Posts: 172
Rep Power: 4 PhilBon is on a distinguished road
Send a message via AIM to PhilBon Send a message via MSN to PhilBon
Do you know what a variable is and how to create/use one?
Do you know what an array is and how to create/use it, and why you would use an array? I would suggest google-ing something like visual basic arrays, or something along those lines.
PhilBon is offline   Reply With Quote
Old Feb 2nd, 2007, 9:57 PM   #6
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,667
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
I would say that what would be best is either have a flag variable that is set to false if the button hasn't been clicked, and change it to true if it has, or you can let them click it the once and then set enabled to false, that way they won't be able to click it again. and you won't even have to check it again because there would be no way for them to click it.
__________________
BIG K aka Kyle
Programming Forums
Kyle K Online

Please do not PM or email me programming questions. Post them in the forums instead.
big_k105 is offline   Reply With Quote
Old Feb 2nd, 2007, 11:43 PM   #7
DWk
Newbie
 
Join Date: Sep 2005
Posts: 7
Rep Power: 0 DWk is on a distinguished road
Exclamation

Actually yes, I do what variables and arrays are.

I already did what you mentioned, about using button.enable = false
after it's clicked.

Now I'm trying to actually do all the checks, but it's not working that well, it randomly (I think), tells me the game is over


Check it out


Public Class Form1
    Dim turn As Integer
    Dim mat(2, 2) As Integer


    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub b00_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b00.Click
        If turn = 0 Then
            b00.Text = "X"
            turn = 0
            mat(0, 0) = 0
        Else
            b00.Text = "O"
            turn = 1
            mat(0, 0) = 1
        End If
        b00.Enabled = False
        If mat(0, 1) & mat(0, 2) = mat(0, 0) Then
            MsgBox("You Win!")
        Else
            If mat(1, 0) & mat(2, 0) = mat(0, 0) Then
                MsgBox("You Win!")
            Else
                If mat(1, 1) & mat(2, 2) = mat(0, 0) Then
                    MsgBox("You Win!")
                End If
            End If
        End If

    End Sub

    Private Sub b01_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b01.Click
        If turn = 0 Then
            b01.Text = "O"
            turn = 1
            mat(0, 1) = 1
        Else
            b01.Text = "X"
            turn = 0
            mat(0, 1) = 0
        End If
        b01.Enabled = False
        If mat(0, 2) & mat(0, 0) = mat(0, 1) Then
            MsgBox("You Win!")
        Else
            If mat(1, 1) & mat(2, 1) = mat(0, 1) Then
                MsgBox("You Win!")
            End If
        End If
    End Sub

    Private Sub b02_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b02.Click
        If turn = 0 Then
            b02.Text = "O"
            turn = 1
            mat(0, 2) = 1
        Else
            b02.Text = "X"
            turn = 0
            mat(0, 2) = 0
        End If
        b02.Enabled = False
        If mat(0, 0) & mat(0, 1) = mat(0, 2) Then
            MsgBox("You Win!")
        Else
            If mat(1, 2) & mat(2, 2) = mat(0, 2) Then
                MsgBox("You Win!")
            Else
                If mat(1, 1) & mat(2, 0) = mat(0, 2) Then
                    MsgBox("You Win!")
                End If
            End If
        End If
    End Sub

    Private Sub b10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b10.Click
        If turn = 0 Then
            b10.Text = "O"
            turn = 1
            mat(1, 0) = 1
        Else
            b10.Text = "X"
            turn = 0
            mat(1, 0) = 0
        End If
        b10.Enabled = False
        If mat(0, 0) & mat(2, 0) = mat(1, 0) Then
            MsgBox("You Win!")
        Else
            If mat(1, 1) & mat(1, 2) = mat(1, 0) Then
                MsgBox("You Win!")
            End If
        End If
    End Sub

    Private Sub b11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b11.Click
        If turn = 0 Then
            b11.Text = "O"
            turn = 1
            mat(1, 1) = 1
        Else
            b11.Text = "X"
            turn = 0
            mat(1, 1) = 0
        End If
        b11.Enabled = False
        If mat(0, 1) & mat(2, 1) = mat(1, 1) Then
            MsgBox("You Win!")
        Else
            If mat(1, 0) & mat(1, 2) = mat(1, 1) Then
                MsgBox("You Win!")
            End If
        End If
    End Sub

    Private Sub b12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b12.Click
        If turn = 0 Then
            b12.Text = "O"
            turn = 1
            mat(1, 2) = 1
        Else
            b12.Text = "X"
            turn = 0
            mat(1, 2) = 0
        End If
        b12.Enabled = False
        If mat(1, 0) & mat(1, 1) = mat(1, 2) Then
            MsgBox("You Win!")
        Else
            If mat(0, 2) & mat(2, 2) = mat(1, 2) Then
                MsgBox("You Win!")
            End If
        End If
    End Sub

    Private Sub b20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b20.Click
        If turn = 0 Then
            b20.Text = "O"
            turn = 1
            mat(2, 0) = 1
        Else
            b20.Text = "X"
            turn = 0
            mat(2, 0) = 0
        End If
        b20.Enabled = False
        If mat(0, 0) & mat(1, 0) = mat(2, 0) Then
            MsgBox("You Win!")
        Else
            If mat(2, 1) & mat(2, 2) = mat(2, 0) Then
                MsgBox("You Win!")
            Else
                If mat(1, 1) & mat(0, 2) = mat(2, 0) Then
                    MsgBox("You Win!")
                End If
            End If
        End If
    End Sub

    Private Sub b21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b21.Click
        If turn = 0 Then
            b21.Text = "O"
            turn = 1
            mat(2, 1) = 1
        Else
            b21.Text = "X"
            turn = 0
            mat(2, 1) = 0
        End If
        b21.Enabled = False
        If mat(0, 1) & mat(1, 1) = mat(2, 1) Then
            MsgBox("You Win!")
        Else
            If mat(2, 0) & mat(2, 2) = mat(2, 1) Then
                MsgBox("You Win!")
            End If
        End If
    End Sub

    Private Sub b22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b22.Click
        If turn = 0 Then
            b22.Text = "O"
            turn = 1
            mat(2, 2) = 1
        Else
            b22.Text = "X"
            turn = 0
            mat(2, 2) = 0
        End If
        b22.Enabled = False
        If mat(0, 0) & mat(1, 1) = mat(2, 2) Then
            MsgBox("You Win!")
        Else
            If mat(2, 0) & mat(2, 1) = mat(2, 2) Then
                MsgBox("You Win!")
            Else
                If mat(0, 2) & mat(1, 2) = mat(2, 2) Then
                    MsgBox("You Win!")
                End If
            End If
        End If
    End Sub
End Class

Any ideas? Thanks

Also, how do you stop the program after it displays the "You win!" message?
DWk is offline   Reply With Quote
Old Feb 2nd, 2007, 11:52 PM   #8
DWk
Newbie
 
Join Date: Sep 2005
Posts: 7
Rep Power: 0 DWk is on a distinguished road
And I'm pretty sure the & is wrong, right?
DWk is offline   Reply With Quote
Old Feb 3rd, 2007, 3:24 AM   #9
PhilBon
Hobbyist Programmer
 
PhilBon's Avatar
 
Join Date: Nov 2005
Posts: 172
Rep Power: 4 PhilBon is on a distinguished road
Send a message via AIM to PhilBon Send a message via MSN to PhilBon
Alright. Let's go through the list of corrections you should make. #1 Do you know about a structure array? Because YOU SERIOUSLY need one. A structure array is an array of structures, where a structure can be a anything from a textbox, button, labels, etc. So what you should do is make a 2-D structure array of buttons and assign each button with an array value. This will help you out in many ways. The second thing you need to do is put everything you have for one button into a function. That way you only have to have the code once. You will need to pass in the values for the button so something like this:
vb Syntax (Toggle Plain Text)
  1. Function setTextValue(byref row as integer, byref col as integer){
  2. buttonarray(row,col).enabled = false
  3. Mapused(row,col) = true
  4. if xturn = true then
  5. buttonarray(row,col).text = "X"
  6. else
  7. buttonarray(row,col).text = "O"
  8. end if
  9. 'basically whatever you want in the function.
  10. }
This will help you. You could probably make this into a more object oriented design but I'm to lazy to help you with that. Now for the if statements:
vb Syntax (Toggle Plain Text)
  1. If mat(0, 0) & mat(1, 0) = mat(2, 0) Then
  2. MsgBox("You Win!")
  3. Else
  4. 'Should be:
  5. If (mat(0, 0) = mat(2,0)) and (mat(1, 0) = mat(2, 0)) Then
  6. MsgBox("You Win!")
  7. Else
I personally would take it from mat(0, 0) = mat(2,0) to be is mat(0,0) = "x" that way you are positive that it is correct, the reason for this is because there could be a chance mat(2,0) could be set to the wrong value.
PhilBon is offline   Reply With Quote
Old Feb 3rd, 2007, 8:52 AM   #10
DWk
Newbie
 
Join Date: Sep 2005
Posts: 7
Rep Power: 0 DWk is on a distinguished road
Cool

Yea, I had a problem in the code were it was doing the incorrect function after clicking the button, but I finally got it right after several tries last night and after I found the error LOL.

Here's the final code:


Public Class Form1
    Dim turn As Integer = 2
    Dim mat(2, 2) As String


    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub
    Private Sub checkdraw()
        Dim returnval As Boolean
        Dim drawarray(2, 2) As Boolean
        Dim i As Integer
        Dim j As Integer
        For i = 0 To 2
            For j = 0 To 2
                If mat(i, j) = "" Then
                    returnval = False
                    drawarray(i, j) = returnval
                Else
                    returnval = True
                    drawarray(i, j) = returnval
                End If
            Next
        Next

        If drawarray(0, 0) = True And drawarray(1, 0) = True And drawarray(2, 0) = True And drawarray(0, 1) = True And drawarray(1, 1) = True And drawarray(2, 1) = True And drawarray(0, 2) = True And drawarray(1, 2) = True And drawarray(2, 2) = True Then
            MsgBox("Empate")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If

        'If String.IsNullOrEmpty(mat(0, 0)) = returnval Then



        'Dim i As Integer
        'Dim j As Integer
        'For i = 0 To 2
        '    For j = 0 To 2
        '        returnValue = String.IsNullOrEmpty(mat(i, j))
        '    Next
        'Next

        'If mat(0, 0) = Not "" And mat(0, 1) = Not "" And mat(0, 2) = Not "" And mat(1, 0) = Not "" And mat(1, 1) = Not "" And mat(1, 2) = Not "" And mat(2, 0) = Not "" And mat(2, 1) = Not "" And mat(2, 2) = Not "" Then
        '    MsgBox("Empate")
        'End If
        'if (mat(0,0) = "X" or if mat (0,0) = "O") and (mat(1,0) = "X" or if mat (1,0) = "O") and (mat(2,0) = "X" or if mat (2,0) = "O") and (mat(0,1) = "X" or if mat (0,1) = "O") and (mat(0,2) = "X" or if mat (0,2) = "O") and (mat(0,0) = "X" or if mat (2,0) = "O") and (mat(2,0) = "X" or if mat (2,0) = "O") and (mat(2,2) = "X" or if mat (2,2) = "O") and (mat(1,1) = "X" or if mat (1,1) = "O")
        'End If

        'Dim i As Integer
        'Dim j As Integer
        'For i = 0 To 2
        '    For j = 0 To 2
        '        If mat(i, j) = "X" And mat(i, j) = "O" Then
        '            MsgBox("Empate :(")
        '        End If
        '    Next
        'Next
    End Sub

    Private Sub checkx()
        If mat(0, 0) = "X" And mat(0, 1) = "X" And mat(0, 2) = "X" Then
            MsgBox("Jugador 1 Gana")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If
        If mat(1, 0) = "X" And mat(1, 1) = "X" And mat(1, 2) = "X" Then
            MsgBox("Jugador 1 Gana")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If
        If mat(2, 0) = "X" And mat(2, 1) = "X" And mat(2, 2) = "X" Then
            MsgBox("Jugador 1 Gana")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If
        If mat(0, 0) = "X" And mat(1, 0) = "X" And mat(2, 0) = "X" Then
            MsgBox("Jugador 1 Gana")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If
        If mat(0, 1) = "X" And mat(1, 1) = "X" And mat(2, 1) = "X" Then
            MsgBox("Jugador 1 Gana")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If
        If mat(0, 2) = "X" And mat(1, 2) = "X" And mat(2, 2) = "X" Then
            MsgBox("Jugador 1 Gana")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If
        If mat(0, 0) = "X" And mat(1, 1) = "X" And mat(2, 2) = "X" Then
            MsgBox("Jugador 1 Gana")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If
        If mat(0, 2) = "X" And mat(1, 1) = "X" And mat(2, 0) = "X" Then
            MsgBox("Jugador 1 Gana")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If
    End Sub
    Private Sub checko()
        If mat(0, 0) = "O" And mat(0, 1) = "O" And mat(0, 2) = "O" Then
            MsgBox("Jugador 2 Gana")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If
        If mat(1, 0) = "O" And mat(1, 1) = "O" And mat(1, 2) = "O" Then
            MsgBox("Jugador 2 Gana")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If
        If mat(2, 0) = "O" And mat(2, 1) = "O" And mat(2, 2) = "O" Then
            MsgBox("Jugador 2 Gana")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If
        If mat(0, 0) = "O" And mat(1, 0) = "O" And mat(2, 0) = "O" Then
            MsgBox("Jugador 2 Gana")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If
        If mat(0, 1) = "O" And mat(1, 1) = "O" And mat(2, 1) = "O" Then
            MsgBox("Jugador 2 Gana")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If
        If mat(0, 2) = "O" And mat(1, 2) = "O" And mat(2, 2) = "O" Then
            MsgBox("Jugador 2 Gana")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If
        If mat(0, 0) = "O" And mat(1, 1) = "O" And mat(2, 2) = "O" Then
            MsgBox("Jugador 2 Gana")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If
        If mat(0, 2) = "O" And mat(1, 1) = "O" And mat(2, 0) = "O" Then
            MsgBox("Jugador 2 Gana")
            MsgBox("Gracias por jugar")
            Me.Close()
        End If
    End Sub

    Private Sub b00_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b00.Click
        If turn = 0 Then
            b00.Text = "O"
            turn = 1
            mat(0, 0) = "O"
        Else
            b00.Text = "X"
            turn = 0
            mat(0, 0) = "X"
        End If
        b00.Enabled = False
        checkx()
        checko()
        checkdraw()
        'If mat(0, 1) And mat(0, 2) = mat(0, 0) Then
        '    MsgBox("You Win!")
        'Else
        '    If mat(1, 0) And mat(2, 0) = mat(0, 0) Then
        '        MsgBox("You Win!")
        '    Else
        '        If mat(1, 1) And mat(2, 2) = mat(0, 0) Then
        '            MsgBox("You Win!")
        '        End If
        '    End If
        'End If

    End Sub

    Private Sub b01_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b01.Click
        If turn = 0 Then
            b01.Text = "O"
            turn = 1
            mat(0, 1) = "O"
        Else
            b01.Text = "X"
            turn = 0
            mat(0, 1) = "X"
        End If
        b01.Enabled = False
        checkx()
        checko()
        checkdraw()
        'If mat(0, 2) And mat(0, 0) = mat(0, 1) Then
        '    MsgBox("You Win!")
        'Else
        '    If mat(1, 1) And mat(2, 1) = mat(0, 1) Then
        '        MsgBox("You Win!")
        '    End If
        'End If
    End Sub

    Private Sub b02_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b02.Click
        If turn = 0 Then
            b02.Text = "O"
            turn = 1
            mat(0, 2) = "O"
        Else
            b02.Text = "X"
            turn = 0
            mat(0, 2) = "X"
        End If
        b02.Enabled = False
        checkx()
        checko()
        checkdraw()
        'If mat(0, 0) And mat(0, 1) = mat(0, 2) Then
        '    MsgBox("You Win!")
        'Else
        '    If mat(1, 2) And mat(2, 2) = mat(0, 2) Then
        '        MsgBox("You Win!")
        '    Else
        '        If mat(1, 1) And mat(2, 0) = mat(0, 2) Then
        '            MsgBox("You Win!")
        '        End If
        '    End If
        'End If
    End Sub

    Private Sub b10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b10.Click
        If turn = 0 Then
            b10.Text = "O"
            turn = 1
            mat(1, 0) = "O"
        Else
            b10.Text = "X"
            turn = 0
            mat(1, 0) = "X"
        End If
        b10.Enabled = False
        checkx()
        checko()
        checkdraw()
        'If mat(0, 0) And mat(2, 0) = mat(1, 0) Then
        '    MsgBox("You Win!")
        'Else
        '    If mat(1, 1) And mat(1, 2) = mat(1, 0) Then
        '        MsgBox("You Win!")
        '    End If
        'End If
    End Sub

    Private Sub b11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b11.Click
        If turn = 0 Then
            b11.Text = "O"
            turn = 1
            mat(1, 1) = "O"
        Else
            b11.Text = "X"
            turn = 0
            mat(1, 1) = "X"
        End If
        b11.Enabled = False
        checkx()
        checko()
        checkdraw()
        'If mat(0, 1) And mat(2, 1) = mat(1, 1) Then
        '    MsgBox("You Win!")
        'Else
        '    If mat(1, 0) And mat(1, 2) = mat(1, 1) Then
        '        MsgBox("You Win!")
        '    End If
        'End If
    End Sub

    Private Sub b12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b12.Click
        If turn = 0 Then
            b12.Text = "O"
            turn = 1
            mat(1, 2) = "O"
        Else
            b12.Text = "X"
            turn = 0
            mat(1, 2) = "X"
        End If
        b12.Enabled = False
        checkx()
        checko()
        checkdraw()
        'If mat(1, 0) And mat(1, 1) = mat(1, 2) Then
        '    MsgBox("You Win!")
        'Else
        '    If mat(0, 2) And mat(2, 2) = mat(1, 2) Then
        '        MsgBox("You Win!")
        '    End If
        'End If
    End Sub

    Private Sub b20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b20.Click
        If turn = 0 Then
            b20.Text = "O"
            turn = 1
            mat(2, 0) = "O"
        Else
            b20.Text = "X"
            turn = 0
            mat(2, 0) = "X"
        End If
        b20.Enabled = False
        checkx()
        checko()
        checkdraw()
        'If mat(0, 0) And mat(1, 0) = mat(2, 0) Then
        '    MsgBox("You Win!")
        'Else
        '    If mat(2, 1) And mat(2, 2) = mat(2, 0) Then
        '        MsgBox("You Win!")
        '    Else
        '        If mat(1, 1) And mat(0, 2) = mat(2, 0) Then
        '            MsgBox("You Win!")
        '        End If
        '    End If
        'End If
    End Sub

    Private Sub b21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b21.Click
        If turn = 0 Then
            b21.Text = "O"
            turn = 1
            mat(2, 1) = "O"
        Else
            b21.Text = "X"
            turn = 0
            mat(2, 1) = "X"
        End If
        b21.Enabled = False
        checkx()
        checko()
        checkdraw()
        'If mat(0, 1) And mat(1, 1) = mat(2, 1) Then
        '    MsgBox("You Win!")
        'Else
        '    If mat(2, 0) And mat(2, 2) = mat(2, 1) Then
        '        MsgBox("You Win!")
        '    End If
        'End If
    End Sub

    Private Sub b22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b22.Click
        If turn = 0 Then
            b22.Text = "O"
            turn = 1
            mat(2, 2) = "O"
        Else
            b22.Text = "X"
            turn = 0
            mat(2, 2) = "X"
        End If
        b22.Enabled = False
        checkx()
        checko()
        checkdraw()
        'If mat(0, 0) And mat(1, 1) = mat(2, 2) Then
        '    MsgBox("You Win!")
        'Else
        '    If mat(2, 0) And mat(2, 1) = mat(2, 2) Then
        '        MsgBox("You Win!")
        '    Else
        '        If mat(0, 2) And mat(1, 2) = mat(2, 2) Then
        '            MsgBox("You Win!")
        '        End If
        '    End If
        'End If
    End Sub

    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click

    End Sub
End Class
DWk is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Associated with Vector Source code buggytoast Java 3 Apr 2nd, 2006 6:41 AM
Backup Script :-) Pizentios Perl 18 Jan 12th, 2006 11:50 AM
IE and dynamic button creation MegaArcon JavaScript and Client-Side Browser Scripting 5 Dec 6th, 2005 9:31 AM
GUI Progress Bar badbasser98 C++ 55 Nov 4th, 2005 8:28 AM
move program console window back badbasser98 C++ 21 Oct 18th, 2005 3:02 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:58 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC