Three new VB.net apps

God these are worthless :P But anyways as a testiment to tradition, here they be

Payraise Calculator (payraise.zip)
A payraise application

Multiplication Teacher (multiplication.zip)


Schedule Book (schedule_book.zip)

As always I’ve added some cool little features. Last week I played around with menu bars (check out the encryption program). This week I tried my hand at Contextual Menus which turn out to be really easy to implement :)

On the Multiplication app you’ll notice there is no “button” that you use to submit your answer. I merely watch for the enter-key in the answer box and use that to call the button_click event. The button is actually on the form though, just hidden. If you want to see the button, right click on the form and choose “show button.”

The coolest thing I did was on the “schedule book” app. If you right click on the form and choose “transparency” you’ll notice the form will expand a bit at the bottom and a slider bar will appear. You can now use this to dynamically change the opacity of the form. Dumb, I know, but its a pretty cool exercise to get you used to the programming language ;)

The biggest problem I had this week was deciding on how to represent and sort the appointments in the schedule book program. At first I tried to make a two-dimensional array with one dimension being an integer (the time) and the other a string (the description). That didn’t seem to fly very well so I settled for making two seperate arrays and their indexes would link the time to the description. A very ugly hack but it worked… until I tried sorting. This proved to be even more ugly so I decided to start over.

I did a little research and decided to implement my “appointments” as structures. This let me use whatever types I wanted and it was pretty easy to implement a little bubble sort on the data. So my structure looked like

Structure appointment Dim time as Integer Dim description as String End Structure

I then manage my appointments by creating an array of appointment structures. To sort this array I step through the array of structures and compare each appointment’s time value to the one next to it and reshuffle appointment structures as needed. This was where using the structure came in really handy. I was able to keep my descriptions and times associated while moving them around in the array as I pleased.

Time for sleep!