VB2019 VB2017 VB2015 VB2013 VB2012 VB2010 VB2008 VB6 VB Sample Code 中文VB About Us

Lesson 28 : Creating Animation

Although Visual Basic 2012 is generally a programming language designed for creating business and other industrial applications and not for creating animation, it can be used to create animation. In this lesson, we will show you just that.

28.1 Moving an object

In this section, we will show you how to move an object by pressing a command button. You need to make use of the Top and Left properties of an object to create animation. The Top property defines the distance of the object from the top most border of the screen while the Left property defines the distance of the object from leftmost border of the screen. By adding or subtracting the distance of the object we can create the animated effect of moving an object.

Start a new project and name it as Movable Object, or any name you wish. Now insert a PictureBox and in its Image property import a picture from your hard drive or other sources. Next, insert four command buttons, change their captions to Move Up, Move Down, Move Left and Move Right. Name them as MoveUpBtn, MoveDowbBtn, MoveLeftBtn and MoveRightBtn. Now, click on the buttons and key in the following code:

To learn the details, we suggest you grab a copy of Visual Basic 2012 Made Easy.

Price: $20.00


Visual Basic 2012 Made Easy is written by Dr. Liew, the webmaster of our popular online Visual Basic Tutorial, vbtutor.net. This book is a complete guide to mastering Visual Basic 2012, from beginner to intermediate programmers.  This book has been written to complement our free online Visual Basic 2012 tutorial with much more content. It is also an excellent reference text for high school or college-level computer science courses.  Reading this book will allow you to:  
  1. Understand the basic concepts of Visual Basic 2012 programming
  2. Create your own Visual Basic 2012 applications from scratch
  3. Get inspiration from a variety of interesting sample programs
  4. Modify the code samples easily to suit your needs
  5. Learn how to package and distribute your applications

Preview the Book

You need PayPal account to order this E-book. If you don't have PayPal Account, get your PayPal account by clicking the banner below:

Sign up for PayPal and start accepting credit card payments instantly.

*Please wait for 10 seconds for PayPal to redirect you to E-book Download Page after ordering and making payment. If you have problem downloading the book, please contact


Mode of Delivery: Download

Warmest Regards



This site and the products and services offered on this site are not associated, affiliated, endorsed, or sponsored by Microsoft, nor have they been reviewed tested or certified by Microsoft.

Contact Information

If you require assistant and technical support, please email


Copyright©2008 Dr.Liew Voon Kiong. All rights reserved |Contact|Privacy Policy