Tuesday, May 5, 2009

Cats and Dogs Assignment

I discovered a few things while doing my Cats and Dogs assignment. Firstly, you can make one panel the child of another panel without realizing it. I made this mistake as I have four panels that fit in to the space of one panel. When I slid them in to place manually, one of the panels wouldn't show up because it was the child of a different panel which, through the code created had had its visibility set to false. This meant that the program would fail to run properly.

What I had to do to fix this problem was to extend the form and seperate all of the panels. I then set the panels in to position using their Location property and then resized the form back to its original size (i.e, big enough to hold one panel). From this point, the program ran perfectly, showing all the panels at the appropriate times.

Another thing I came across was the use of images. I had them set from an absolute path on my memory stick. The problem was that when I handed the assignment in, Rachael wouldn't have access to the pictures for the slide show. I figured that there had to be a way to set the pictures in to the program itself, but I could not see how to do this. I tried putting the pictures into the Resources folder, but I had dragged and dropped and it didn't work when I tried to use Intellisence. I found a very easy to use example for adding pictures to your resource folder written by Craig Cureton, one of the students in the other Cert IV Programming class and this problem was also solved.

I still have two assignments to get done for Programming, the Class Diagram and the Alarm Clock. I'm hoping to have these done by the end of the week.

No comments:

Post a Comment