|
|
Visual Basic
06 Option Button Program
Video Instruction
- Completed project overview.
- Setting up the form.
- Creating an option button array.
- Programming the options. Part 1, Part 2
- Clearing objects when a text box is changed.
Use one form to provide the following program. Save the form
as 06_xxx_opt where xxx is your initials.
Create a frame which has an option button array for
each of the following programs. Make sure that all option buttons have a default
value of false at startup. Output the result to a label or picture box as required.
A change in any text box should reset all option button values to false, clear
the label and make the picture box not visible.
- Use text boxes to input (x1, y1) and (x2, y2) for two pair of points
in the coordinate plane (all values of x & y will be in the range of -10
to 10).
- There should be one option button in the array for each of
the following problems.
- Find the equation of the line
through the points (x1, y1) and (x2, y2) (Recall that slope may
be undefined!).
- Find the midpoint of the line segment from
(x1, y1) to (x2, y2).
- Find a center and radius of the circle with
the endpoints of the diameter at (x1, y1) and (x2, y2).
- Make a picture box visible and draw a coordinate
grid with scale tick marks every one unit. Label the tick marks
in units of 5. Draw the line segment from (x1, y1) to (x2,
y2).. The output should be as below.
Visual Basic Assignment
Page
|
|