A Tetris Clone (VB5/6)

This excellent project shows how to create a Tetris Game in VB5 (and VB6) using just the standard VB controls.


Difference with Other Tetris Games:

  • works with levels, with different widths
  • get rid of all 'yellow balls' is enough to go to the next level

The Game

After you launch the program, you always start at level 0. Unless you close the application you can play the game again and again, moving up the levels when you pass at least 3 levels in one game. For instance, if you don't get to level 3 in your first game, you will have to restart at level 0. On the other hand if you end at level 14, you'll be able to restart at level 12.

There are 100 levels at present. For every level you can find a trick to pass through it. Without this tricks you will have a hard time to pass levels. When there are no more levels, you will get random levels instead. Of course this means you will have to pass a hundred levels before you reach this point.


  • left/right cursor - move falling piece left/right
  • up cursor - rotate falling piece
  • down cursor - speed up fall rate of piece
  • space - fast dropdown of falling piece

Rules of the Game

As soon as all 'yellow balls' are removed from the playing field, you can resume with the next level. When the 'Extend with balls' flag is set, new 'yellow balls' will appear as a kind of falling pieces. They can be a great help in certain situation. They can be a terrible nuissance in other situations.

Score Counting

Per piece     100
Per line      1000
Per level     100000 divided by the no. of lines you needed to pass
              through the level --> the less lines, the more points
              you get
Per 5 levels  50000
PROJECT NAME: stris.vbp

ENVIRONMENT: This is a VB5 project, which will run under Windows 9x.
             No other than basic VB-controls are used.

YOU CAN LEARN:  How to build a (tetris) game.

COPYRIGHT: None. I made the code myself and everybody is free
           to use it.

RUNTIME FILES: stris.exe

CODE FILES: stris.vbp/.vbw



Download Zipped Project File (37k)


  • comments

    Posted by Legacy on 11/14/2003 12:00am

    Originally posted by: siju

    it is very attracting program

  • Very Good - taught me heaps.

    Posted by Legacy on 07/25/2003 12:00am

    Originally posted by: Chris Drew

    Hi! I'm 14, and have been mucking around with VB6 since I was 11 or 12. I'm not too good but this taught me heaps, and I encountered no errors. Your code is compex!

  • Wasted my Time

    Posted by Legacy on 05/23/2003 12:00am

    Originally posted by: Somnath

    Don't waste your time downloading ths

  • Tetris Code Error

    Posted by Legacy on 05/18/2003 12:00am

    Originally posted by: Sin

    Do a search for the following
    Private Sub DrawSquare(ByVal phDC As Integer

    Change to

    Private Sub DrawSquare(ByVal phDC As Long

    Works in VB6 then


  • fix for the overflow ...

    Posted by Legacy on 01/10/2002 12:00am

    Originally posted by: Tolga Yazar

    You just need to replace :
    "ByVal phDC As Integer" with "ByVal phDC As Long"
    in frmStris, DrawSquare function parameters.

    Search for the function:
    ' draw one single piece-square
    Private Sub DrawSquare(ByVal phDC As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal tpe As Integer)


  • vb6 over flow error

    Posted by Legacy on 06/11/2001 12:00am

    Originally posted by: crash

    does not work in vb 6

  • error in the code

    Posted by Legacy on 06/01/2000 12:00am

    Originally posted by: ck

    I'm trying it with vb6
    there is an overflow error.
    can you fix it?
    I want to see the game...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Moving from an on-premises environment to Office 365 does not remove the need to plan for disruptions or reduce the business risk requirements for protecting email services. If anything, some risks increase with a move to the cloud. Read how to ease the transition every business faces if considering or already migrating to cloud email. This white paper discusses: Setting expectations when migrating to Office 365 Understanding the implications of relying solely on Exchange Online security Necessary archiving …

  • Lenovo recommends Windows 8 Pro. "I dropped my laptop getting out of the taxi." This probably sounds familiar to most IT professionals. If your employees are traveling, you know their devices are in for a rough go. Whether it's a trip to the conference room or a convention out of town, any time equipment leaves a user's desk it is at risk of being put into harm's way. Stay connected at all times, whether at the office or on the go, with agile, durable, and flexible devices like the Lenovo® …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date