One Cuckoo Short of a Nest Quick Links

News PoliticsReviews IT On A Friday Cabinet Unpacked

Friday, June 12, 2009

Friday Fun: Make Your Very Own Pointless Program

Digg this
Feel like whiling away ten minutes? What better way to do it than by making a program that will make your friends think you are uber-cool!

If there is any one point to this, it is a very basic tutorial of MS Visual BASIC 05/08.

The process and code are very simple and Visual BASIC 2005 or 2008 can be used. Download the example to see how it should work if you run into any difficulties.


1. Add two scroll bars (I used one vertical and one horizontal), four progress bars and two picture boxes (dimensions set to a size of 1,1) to a blank form. Assign an image to each picture box.

2. Add the following code to the scroll event of one of the scroll bars:

ProgressBar1.Value = VScrollBar1.Value

ProgressBar2.Value = VScrollBar1.Value

ProgressBar3.Value = VScrollBar1.Value

ProgressBar4.Value = VScrollBar1.Value

HScrollBar1.Value = VScrollBar1.Value

PictureBox1.Height = (VScrollBar1.Value * 1.3)

PictureBox2.Width = (HScrollBar1.Value * 1.3)


And this to the scroll event of the other scroll bar:

ProgressBar1.Value = VScrollBar1.Value

ProgressBar2.Value = VScrollBar1.Value

ProgressBar3.Value = VScrollBar1.Value

ProgressBar4.Value = VScrollBar1.Value

VScrollBar1.Value = HScrollBar1.Value

PictureBox1.Width = (HScrollBar1.Value * 1.3)

PictureBox2.Height = (VScrollBar1.Value * 1.3)

3. And that’s it! Have a little play and see what happens to the picture boxes when you drag each scrollbar. Add bits, play around with it. There are a large number of toolbox items that use the ‘value’ field that can be easily added to this. Go wild – there are no boundaries to a program without any purpose!

Download the One Cuckoo short of a Nest example. (http://www.freewebs.com/gpile/PointlessProgram.exe)

0 responses:

Post a Comment

Insulting, abusive or obscene content will be removed. Replies from non-members will be approved before being displayed.

Most Popular This Week on OCSN

Save the net from censorship!



Counter