in my programming class we r making a simple game. the point of the game is to press as many buttons as possible in sertain amount of time, X is represented as the buttons. but idk how to assign the buttons to be X. there are currently 20 buttons atm. some of the code and 1 button as following: Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If x < 10 Then Form2.Visible = True Me.Timer1.Stop() Me.Timer2.Stop() End If End Sub ----------------------------------------------------------------------- Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick If x > 10 Then Form3.Visible = True Me.Timer1.Stop() Me.Timer2.Stop() End If End Sub ----------------------------------------------------------------------------- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Button1.Dispose()
Surely you can explain your problem better than that! For example, this: "X is represented as the buttons." is senseless, along with things like "r", "idk", and "atm" (do you need cash?).
Hi, Why not give us your source code whatever written? If you have written game logic then please give it to us too. Cheers
i did put the code. that is all i have i havent been able to move foward with out letting the application know that the buttons represent X. ill repost the entire code when i use the computer which i made the game on. im new at this and its a class work/mini project... i shall repose the code asap. thank you
code: Code: Public Class Form1 Dim x As Integer Dim button(19) As Application Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If x < 10 Then Form2.Visible = True Me.Timer1.Stop() Me.Timer2.Stop() End If End Sub Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick If x > 10 Then Form3.Visible = True Me.Timer1.Stop() Me.Timer2.Stop() End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Button1.Dispose() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Button2.Dispose() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Button3.Dispose() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Button4.Dispose() End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Button5.Dispose() End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click Button6.Dispose() End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click Button7.Dispose() End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click Button8.Dispose() End Sub Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click Button9.Dispose() End Sub Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click Button10.Dispose() End Sub Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click Button11.Dispose() End Sub Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click Button12.Dispose() End Sub Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click Button13.Dispose() End Sub Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click Button14.Dispose() End Sub Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click Button15.Dispose() End Sub Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click Button16.Dispose() End Sub Private Sub Button17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button17.Click Button17.Dispose() End Sub Private Sub Button18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button18.Click Button18.Dispose() End Sub Private Sub Button19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button19.Click Button19.Dispose() End Sub Private Sub Button20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button20.Click Button20.Dispose() End Sub End Class