|
-
Nov 21st, 2002, 05:59 PM
#1
Thread Starter
Junior Member
Good evening, need some help please(vb.net)
Okay, I am basically bran new at programming, I have never programmed in any other language than vb.net, so yes, I am unexperienced.
I am in the midst of a battleship application, you know, the game.
I am trying to get the application (in Visual Basic.net ) to randomally place points (or ships, which are going to consist of 1 letter) behind certain points. The user will select his or her guesses buy pressing buttons (a series of 100 buttons that form the grid). So I by them pressing the button, they will press the randomly placed object, or button.
So I don't have to just randomly place points on the entire form, but randomize locations in a given section of the form, is that possible? I have read all over msdn library and can't find anything that I can related to what I am trying to do.
If there was a way to select all the buttons, or a universal button term, then I could easily use if-then statements, but I don't think that is going to work.
Thanks for the help in advanced if any is given.
-
Nov 22nd, 2002, 04:03 AM
#2
-
Nov 22nd, 2002, 09:21 AM
#3
Addicted Member
VB.NET doesn't support control arrays as VB6 does, but you can do basically the same thing by having a handler for all of the buttons. I don't have .NET at work yet so I can't give you the code but take a look at the Handles keyword.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|