Submitting VB Files/Folders
(Differs from VB Guide Method)
Logon to D2L
Click Assessments then
Click the link that
corresponds to what you are submitting, e.g., "Lab 1...", etc.
Click the Add a File button
Click the Browse button, open
your CSC110Student folder, then right
click on the Lab folder. Mouse over Send To, then click
Compressed (zipped) Folder. This will create a new file with the
same name as the folder, (in this case Lab) and will have
a zippered folder icon next to it. Click this newly created file,
then click the Open button.
Click the Add button, then
click the Upload button. You can add a comment (not usually
needed) then click the Submit button.
You will see a File submission
successful comment, and an email confirmation is sent.
You will not see a grade until your
instructor has posted it.
These VB Tips
were created to use with VBSystemApp (VBSA) Guide, instruction in class, and the lab work that you
do. They are not a replacement for any of these items, but you
should find them very useful.
CSC 110 Success
Get Labs in on time - as expected per the samples, and done
Communicate - if you can't get in, let your professor know and
get caught up.
Ask questions - especially for the VBSystemApp (VBSA) Guide material. Quick
office hours visits really help!
Come to class - students that attend and participate have proven
to earn better grades.
These Tips are for any students using Dr. Fabrey's VBSystemApp (VBSA)
You are learning a new
language, so to succeed: 1) be very focused during class; 2)
carefully read the Guide; and 3) ask relevant questions during class.
This is an
excellent chapter; make sure to read the VBSA Guide and do the exercises!
were used for messages, accepting messages from a user InputBox,
strings of characters were entered, and math was performed using text
numbers were generated using the procedures of Flip (1 of 2 possible
outcomes), Spin (1 of 4 possible outcomes), Roll (1 of 6 possible
outcomes), and finally using random (1 of n possible outcomes, with
n = a number we select).
Concatenation allows us place two or more items side-by-side,
e.g., the text from a Name text box & a message. We used the
ampersand symbol (&) to
used to create customized messages, even with concatenation.
Lab1CreditRandomSpinRollTravel (for students in Prof. Battilana's VB
Labs -- otherwise check with your CSC110 professor). Run Lab1CreditRandomSpinRollTravelEncrypted to see how it works. What is familiar
and what is new?
Create the form using "VBSA" - you can do this on any
PC running Windows. You will add two buttons, three textboxes,
two listboxes, and two pictures (1 = ThumbsUp; 2 = Dice 1.
Neatness counts - your completed form should look exactly like
the original RandomMotion; the exact size and position it should be in (TOP,
LEFT, HEIGHT, WIDTH).
The text for the Form should contain the name of the Lab and
your full name.
your work in the folder named: LastnameFirstname1
Coding Tips - Available in
D2L for TuTh class on Th, 9/21;
MoWe classes on Mo 9/25.
Enter key after every entry
frequently from within DESIGN mode
and ask a question if you see any popup warnings
a NEW folder (using Save in bottom left quadrant):
OK button, then carefully pick a location on your
Make New Folder button, type in folder name, then hit
new folder name then click OK button (two
setting object Properties or Coding, the top of the
top right quadrant must show the name of object you are working on!
Interchangeable Terms: Program =
Window = (Business) FORM; Instructions =
CODE. We will tend to use the 2nd of each interchangeable term.
Forms, placing Objects like buttons, listboxes, pictures, textboxes,
and lines on it (the Form is also an Object. We also set the Properties
of the Objects, like text, fore color, back color, size, and
positioning. 2) Write CODE for some of the Objects; usually those
that are activated by the user by clicking them, and in some cases,
simply loading (running) the program. Much of the code is
pre-written procedures that are stand alone, or that are used in
conjuction with code we write. 3) We RUN programs we have
created as a means to test and debug them to ensure they work as we
we discussed in this chapter thus far includes:
which allows the user to pick a speed for travel (lower numbers are
faster. The code is simply "Speed" (placed on a button named
which allows users to end a program. The code is simply "End",
(placed on a button named "Exit").
Selecting and sizing images onto a picture object and moving it
was is done by "PictureNumber.Image = ImageName", "PictureNumber.Width
= Constant(pixels)", "PictureNumber.Height = Constant(pixels)", and
"travel [direction | ObjectBeingMoved |
distance (pixels)]" respectively.
Lab1Practice1MovingCar we also took a brief look at MsgBox, custom message boxes for users,
vs. WAIT (a pre-written
message box to delay user while a procedure finishes running, which
we will also be using).
Repetition of code using a For Loop was used to move a picture
in a counter-clockwise direction using only 4 lines of code. The
code used was to first select the "TextboxName; we used "n"", then
"=", "Constant (starting number; we used "1")", "To", "Constant
(ending number; we used "4")", then finally clicking the "Add"
button. This creates the code structure starting with "For n 1 to
4", a blank line, then a new line with the ending code "Next". We
replaced the blank line with 2 lines of code, which runs 4 times,
with n changing sequentially from 1 through 4. The 1st line
"List1.Index = n" selects directions in List1 starting with 1
(East), then 2 (North), etc. The 2nd line "travel List1 Picture1
120" means travel = cause to travel; List1 = direction from List1
based on n; Picture1 = object that will travel; 120 = 120 pixels of
code to move a picture in a clockwise direction, but in 8 lines
of code vs. 4 using the For Loop (above) Movement (travel) using a
numbered direction from a Listbox and the travel procedure. The 1st
line of code, "List1.Index = 3" means the direction will be index 3
(West) in List1. The 2nd line used the travel procedure,
specifically "travel List1 Picture1 120", where travel = cause to
travel; List1 = use selected direction (West from 3 in 1st line)";
Picture1 = object that will travel; 120 = 120 pixels of movement.
important Random Number Selection code includes:
Number uses the code "random TextboxNameOfOutcome
TextboxNameOfMaximumNumberSet". We used the code "random
generates a random number of 1 or 2 and is used for coin flips where
1 = heads and 2 = tails. The code is "flipCoin TextBoxNameOfOutcome
PictureNameToShowHeadsOrTailsImage". We used "flipCoin Number
Listbox a random number from 1 to 4 and is used for compass
directions in this chapter. The code is "spin TextBoxNameOfOutcome
ListboxNameWithDirectionsIndex" and we used "spin Number List1".
Die generates a random number from 1 through 6 used to represent
the possible outcomes of the roll of a die. It uses the code "rollDie
outcome PictureNumber", where outcome = TextBoxNameOfOutcome and
PictureNumber = PictureNameToDieImage).
room UNA 146
[same building as bursar's & registrar's offices].
Other hours: see your
CSC 110 Links
VB Demo/Lab Programs:
VBQ Prep Lab
Grade & GPA Estimator
L3P1TT1 vs P2TT2