|
Basic
Option Graph Step 1
Create
a New Project based on the Option Calculator
The Basic Option Graph Project will build on the interface and
functions we have already created for the Option Calculator. If you
have not already completed the Option Calculator, do that before starting
this Project.
In order to keep both the original Option Calculator Project and the
new Basic Option Graph Project on your computer, the first step is to
copy the Option Calculator Project in a special way. You might think
that you could just use "Save As" from the File menu in Visual Basic
to save a copy of the Option Calculator Project with a new name, but
Visual Basic does not work like that. If you use "Save As", you will
NOT create a new and separate Project.
Instead, follow these steps to make a new and entirely separate Project,
but which retains all of the code and design you have already created:
Open the Option Calculator Project in Visual Basic. From the File
Menu, select "Export Template". As answers to the questions that follow,
choose:
- Template type: Project Template
- From which Project?: Option Calculator
- Template Name: Option Calculator Template
Accept the defaults for everything else, and click Finish.
Now from the Visual Basic File Menu, select "New Project". You will
get a screen showing the Project types you can create. The Template
you just made should be on the list, as "Option Calculator Template".
Select it. Change the name of the Project from "Option Calculator Template
1" to "Basic Option Graph" and click "OK".
Visual Basic will show a blank Project Screen, but on the right side
of your screen you should see the Name "Basic Option Graph" in the "Solution
Explorer" window. Below "Basic Option Graph" you should see some names
you are already familiar with from the previous Project. Click on each
of the following names in turn, then click the "View Code" icon in the
Solution Explorer Menu bar:
- OptionCalcs.vb
- EquityOption.vb
- Form1.vb
Also select Form1.vb again in Solution Explorer and click on the "View
Designer" icon in the Solution Explorer Menu bar.
Select the tab that says "Form1.vb [Design]". Click on the blue title
bar of Form1. Look in the Property Window, find the Text Property, and
change it from "Option Calculator" to "Basic Option Graph".
Now you have your entire previous project recreated, but with a new
name.
From the Visual Basic File Menu, select "Save All" and save the project
with the name "Basic Option Graph". Now there are two separate Projects
on your hard drive, the "Option Calculator" and "Basic Option Graph",
and working on one will not disturb the other.
Also, you have Option Calculator as a Template, so if you ever want
to experiment with your own custom code, you can start a new Project
from the Template as outlined above, and your new code will not affect
the code in Option Calculator.
|