Here is source code to a game I've been writing for years.
Its not a serious effort on my behalf.
I dig out the source code every now and again and start work.

Its more as a bit of fun and something to keep me occupied than anything else.
An intro as to why I started this can be found here

Then, the last few versions are below :
1.0.13, 1.0.14, 1.0.15, 1.0.16, 1.0.17

And here is the latest "snapshot" of the code : 1.0.18
The code in this file may or may not work, I've no idea.

If you read the craft.txt file above, you'll understand why some of the code in Craft is rather crap, and some other parts of code, quite good.
Anyway yeah you can borrow, modify, steal, molest, or do anything you want with the code.
The game doesn't do all that much at the moment, but the framework is there for so much more.

If you want to see what is actually possible in VB,
then check out an excellent game called Sentience.
You can download the game from Artbiter or Behemoth's signatures.