Minesweeper in VB.NET

  • Thread starter Thread starter hasnain_razwi
  • Start date Start date
H

hasnain_razwi

Guest
Hi all. Im new to the .NET environment. I dont know if this is the right forum for posting this message (since Im new to the forum to) but here goes! I need help with making a Minesweeper game in VB.Net. if anyone has any suggestions or can recomend sites where I can get some source code, it would be great. Plus if you can give me advice on which objects (like grid boxes, picture boxes) I should use for my interface, please do.
Thanks
 
Do you want to write it from scratch? If so, you don't need source code :)

If you want to tweak an existing game, like Minesweeper, to learn how to write a game - you can probably search the net for a few versions.

What's your level of experience? Do you know VB.NET very well and just need help with the game, or do you need help learning VB as well?

-ner
 
I think it's a very easy game to do, and you shouldn't have many problems if you have some basic knowlege on the .net platform.

Give it a shot... a bunch of buttons and some random numbering wont hurt anyone! :D
 
Yes, but at a minimum there's going to be some kind of 2 dimensional array being used (or something more complicated). Since he's asking such a broad question, I wanted to know if he's ready to do that kind of coding yet or maybe needs some basic programming lessons before tackling something bigger.

-n
 
well i have some experience with progaming. so i can handle complicated codes. i have been toying with the idea of a two dimensional array for buttons or picture boxes myself. thing is, it was very easy to create a control array in vb 6. but i dont know how to make a control array in vb.net. any suggestions on that? and can u recomend any sites that would have the source code for that game so i can look it up.
thanks.
 
I had a similar situation in one of my calculator programs. The form has a bunch of bitmap buttons whose position, number, and text vary depending on a user menu selection. All the button information is in a 2D array, with the first dimension holding its placement and the 2nd dimension its value. As I remember, if the first dimension was "" then the button was not created, if not then it was. The array numeric structure handled the buttons position, ie. (0,0) in one place, (1,0) in another ,etc. So, it went like this in a loop: if array(i,0) <> Nothing then put in the #i position with a number i event handler with the button text being array(i,0). The remainder of the array was calculation formula and values. It's actually easier than it sounds and working with 2D arrays in a loop is very simple.

I hope this helps
Dan
 
Back
Top