CIS 380 Lab 6

Points: 50 Due Date: Friday February 14, 2003

This time you get to create an ActiveX control and test it. This control will get telephone numbers from the user. It will contain text boxes to get the area code, the exchange and line. There are some rules about what it will accept. The area code can only have 3 digits. It won't allow any more or less than that. Also no letters. The exchange is also limited to 3 digits only. Further, it won't allow 555. The line box will only accept 4 digits. Hint: the keypress event is your friend. See the examples in Chapter 14. Also note that the control must be resizable.

It will have one retrieval method. This will return the phone number in one of two ways, either the standard format

(areacode) exchange-line

or the more trendy format of
areacode.exchange.line

Which form it takes depends on a design time property called format that is Boolean.

Once you have the control written, you have to construct another program to test it.

The executable may help clarify the requirements. Download the Zip file that contains the executable and component file(~11K). Or you could download this MUCH bigger VB generated package. It is about 3M and expands to over 4M. The first zip file just has the executable test program and .ocx file for the component. That seems to be enough.

Yours does not have to look just like that. The position of the controls, their names or the labels on them is not the primary thing. ASK if you aren't sure what I mean or if you want to know if you are going in the right direction.

Deliverables:

  1. Print, fill out and attach the cover sheet.
  2. Source Printout. All the needed output can be generated by selecting File from the VB menu bar. Then select Print. This displays a window, from which you should select to print the form image and the code.
    The source code must have your name in the comments as well as the lab name or number.
  3. Data Files
  4. Attach a printout of the original data file and the resulting one.

Notes


ASK if you have any questions.