A-level Computing/AQA/The Computing Practical Project/Advanced VB.NET

All the programming you have done so far has been with the command line. This is great if all you want is text on a screen, but you probably want to display some graphics. There are several places you can get started:

Here we are going to look how we can very quickly display graphics in VB.NET and make some simple games. To display graphics we are going to use the GDI+ library of tools. DirectX is much more powerful, but for our needs GDI+ is a simple way to get started. GDI+ allows you to draw both vector and bitmap graphics to the screen. There are a couple of functions that you need to be familiar with:

frmGame_Load
This code runs when the form is first loaded

frmGame_KeyDown
This code runs on the event of clicking a key on your keyboard

tmrBall_Tick
You need to have added a timer to your project and named it tmrBall. This code runs on each tick of the timer.

Paint
This code draws the items on to the screen