Jump to content
Xtreme .Net Talk

Minesweeper in VB.NET


Recommended Posts

Guest hasnain_razwi
Posted

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

  • *Experts*
Posted

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 want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

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

Software bugs are impossible to detect by anybody except the end user.
  • *Experts*
Posted

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

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Guest hasnain_razwi
Posted

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.

  • *Experts*
Posted

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

Member, in good standing, of the elite fraternity of mentally challenged programmers.

 

Dolphins Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...