Code examples from class
Section 7: MF 1:45-3
Please note, you can look at each example in two ways. First,
you can look just at the code, which is the .txt version,
or, you can *save* the form (right click on the link and say "save as" to your hard drive) and then
double click on
the file on your hard drive and it will open in VB.
If you open stuff in VB, you may have to click on the + next to the word
"forms" in the top right corner, and then double
click on the form name that appears to see the form.
To see the code, go to the view menu and select "code"
Thursday, January 22
For the first example, there are two files that you need to download if you want to view my code
in VB
(because we included a picture in the form).
Remember for both of these files you're going to have to right click and say "save as" to your
hard drive
- lecture_2_example.frm (right click and save as)
- lecture_2_example.frx (right click and save as) (the frx file has the VB info
that allows you to see the picture on the form. Important note: the frx file is
NOT what you use to include a picture if you wanted to build this from scratch
- To view this example in VB: Download the frm and frx files above to the same folder,
and then open just the frm file in vb. The frx file will automatically add itself.
If you just want to take a look at the code we wrote for this program on the web,
then you can look at:
If you want to build a form using that same picture, you can get a copy of the picture here (again,
right click and do save as):
rowan_cs_logo_by_andrew_crowell.jpg
If you want to run the second example in VB, all you need to do is download the frm file.
I've also included a txt file below that you can just click on to see the code on the web
Tuesday, January 27th
Thursday, January 29th
Note: Somehow I lost the code we wrote together in class. This is my best recollection of what we wrote.
Tuesday Feb 3
Page 82 num 45:
Page 82 num 47:
Thursday, Feb 5
Intro to strings:
Celsius to Fahrenheit (you still need to program one button):
Read from a text file: (we'll review this on Tuesday)
Tuesday, Feb 10
Reading from a file:
Thursday, Feb 12
Built-in functions
Thursday, Feb 19
Subs you write yourself
Thursday, Feb 26
Prob 17 page 193
Prob 19 page 193
Thursday, March 12
If statements
Nutrition facts problem from old midterm
Tuesday, March 24
Reading from a file:
Thursday, March 26
More ifs:
Leapyear:
Thursday, April 2
select case:
President on July 4th:
Thursday, April 16
More loops:
Thursday, April 30
Vowels exam problem