CMSC 434            Homework #3 Part A - 0% of Grade            Spring 2003


"Due" before Monday March 17th
(Not really handed in, but this is when you should have it done if you plan to do it...)

Like sands in an hourglass, so are the strange shapes on my screen....

In this homework, you will take an existing Visual Basic application, examine how it is laid out, how attributes are set using the property panel as well as by code and then make the modification specified below. We will look at Visual Basic a little in class, but typing "visual basic tutorial" into your search engine of choice will provide you with many options!

Things your project should do:
  • There is a control array that is made up of 6 shape objects. The name of the array is "Ticks". You'll see that each member of that array is listed. They all have their shape set to be circle. Add three more objects to the form that are shapes like these and move the existing as well as new shape objects so that they are now a larger ring. Modify the code as needed so that the program will cycle through all 9 shapes in turn (clockwise order) rather than just the original 6. After you have this working, change two of the shapes so that they are rectanlges and one to be a square.
  • Add a button to the form that will allow you to restart the ticking process if you've stopped it.
  • Add a button that will turn all of the "Ticks" shape objects into circles. (Extra credit if you can add a button that turns them back to the shapes they had when the program started.)
  • Add a button that will reset all of the "Ticks" shape objects to appear gray again.
  • Add three more time interval selections to the menu: .35 seconds, 1.58 seconds and 4 seconds and make 1.58 seconds the default starting choice.
  • Add a checkbox for direction. If it is checked the ticks should change clockwise, if not they should change colors counter-clockwise. When the program starts, this should be checked. You should choose the caption for the object (and perhaps the tooltips) to make it easier for the user to figure out what that checkbox does.
  • Place a small GIF or JPG image in the center of the ring formed by the "Ticks" shapes using an image object. The image should be about the size of an icon.
  • Finally, modify the Mouse events so that the user can click and drag any of the "Ticks" shapes around the screen. For a minimum requirement, you can leave it so that when the user clicks within the bounding box of the circles it works, but for bonus points, modify the WithinShape() fuction so that it checks to see if the shape is a circle, and uses the correct math to determine whether you have clicked within the actual circle.

    The baseline version of the program is posted here as a ZIP file.

    I suggest that you test things out by sending the zipped file to yourself, extracting it to a fresh directory in a WAM lab and trying it out from scratch just like we would if we were grading it.

    This homework is worth 0% of your grade. It is not to be turned in. I would suggest that if you have not done any GUI programming before, that you do this "homework". Homework 3 "B" will be posted soon. Also, this will likely help prepare you for your work on Project 2 (soon to be posted as well).

    Web Accessibility