How to Make a Cheese Eating Program on Visual Basic

by NatNoBrains in Circuits > Computers

2872 Views, 4 Favorites, 0 Comments

How to Make a Cheese Eating Program on Visual Basic

3.GIF
cheese0.jpg
cheese1.jpg
Hi,
This is my tutorial on how to make a program that I *invented* on Microsoft Visual Basic 2010.
You need to download the four files below, the cheese, the eaten cheese, the .ico file and the mp3.
Put them all where you will be able to find them.

Downloads

Preparing

1.gif
2.GIF
Create a new Windows Forms Application and call it CheeseEater.
Change the form size to 310, 314
Change the icon to the cheese.ico file.
Change the text to Cheese Eater 2000

The Base

3.GIF
Select PictureBox from the toolbox. In properties go to Dock, then press the big middle one or fill. Then select image then find the cheese0 file. It should now look like the picture below:

Code

4.GIF

Copy this code and paste it in the solution which can be found by right-clicking on Form1.vb and selecting Show code.

Public Class Form1

Private Sub cheese_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click

PictureBox1.Load("[Where the file cheese1 is located]")

My.Computer.Audio.Play("[File where nom.wav is located]", _
AudioPlayMode.Background)
End Sub
End Class

Your code should now look like this:

Enjoy!

OK, this was kinda pointless, but I'm new to VB.
If you need any help, just comment in the comment section or send me a message.
NM