|
Submitting VB Files/Folders
(Differs from VB Guide Method) |
-
Logon
to MyITLab.
-
Click Course Content.
-
Click VB Lab n (n = 1, 2, or 3),
for example, VB Lab 1.
-
See notice, then click Start.
-
Click Browse, then from your Student folder,
right click on folder nC Lab, for example, 1C Lab.
-
Point to Send To, then
click Compressed (zipped) Folder. This creates a new file
with a zippered folder icon named the same as the folder you zipped
(but with a .zip file extension).
-
Double click the the newly created
zipped file, then click the Add button.
-
Click the FINISH: Submit for
grading button, then click the Finish button.
-
A confirmation will appear or your
screen and you're done!
|
Using
These VB Tips
in
CSC 110 |
These tips
were created to use along with the Quick Guide to Visual Basic
Express, 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.
|
Helpful
Thoughts for
CSC 110 Success |
-
Get Labs in on time - as expected per the samples, and done
well.
-
Communicate - if you can't get in, let your professor know and
get caught up.
-
Ask questions - especially for the Visual Basic material. Quick
office hours visits really help!
-
Come to class - students that attend and participate have proven
to earn better grades.
|
Visual Basic Lab 3 (for students in Prof. Battilana's VB
Labs -- otherwise check with your CSC110 professor):
In your 3C Lab folder (within your Student folder),
replicate Executable Computer Pay.exe. Use these and
steps in your VB Guide:
- Use VBDesigner.exe in your Student folder to
create Computer Pay in folder 3C Lab. Your
form will contain these objects:
- 4 Labels
- 1 Blue on White, Courier New 14
- 3 Yellow on Green, Microsoft Sans Serif 10
- 1 Text Box
- Read Only (will have a light gray BackColor),
Microsoft Sans Serif 14
- 2 List Boxes (both Microsoft Sans
Serif 8)
- 2 Buttons (both Microsoft Sans Serif
12)
Remember to point at objects in
Executable Computer Pay.exe to see Tool Tips
showing what the properties need to be.
-
Again, other than the different object names, the
Lab 3 code will be very similar to the practice,
which is in the VB Guide. Here are the recommended steps per
the VB Guide and tips (code
will only work when proper syntax and formatting is used):
-
Code
btnExit
-
Code the Form
-
Clear
and place Focus on the Text Box)
-
Clear
the List Boxes
-
Declare your 2 variables (1 Decimal; 1 Integer)
-
Fill
List Boxes with formatted numbers using Loops
-
Preselect
default numbers in the 2 List Boxes
-
Code
btnCompute
-
Declare the same variables you created and used in
Form1_Load
-
Define each variable to be used as numbers in your
calculation
-
Do
your calculation code using your variables as numbers
-
Format your result as US Currency
-
Make sure the form matches the original (how it works, size,
fonts, alignment, etc.)
|
|
Submit your work
(entire 3C Lab folder), using Digital Dropbox in
Blackboard -- as covered in class (instructions are
in the left column). |
| |
Visual Basic Notes 3:
We addressed many new items in this chapter, however many are
also very easy (the following discusses only NEW items):
|
| |
Visual Basic Lab 2 (for students in Prof. Battilana's VB
Labs -- otherwise check with your CSC110 professor):
In your 2C Lab folder (within your Student folder),
replicate Executable Computer Quote.exe. Use these and
steps in your VB Guide:
-
Use VBDesigner.exe in your Student folder to
create Computer Quote in folder 2C Lab. Your
form will contain these objects:
- 9 Labels
- 1 Red on White, Comic Sans MS 14
- 6 Blue on Yellow, Microsoft Sans Serif 10
- 2 for lines (Black BackColor sized to
minimum height)
- 8 Text Boxes (all Microsoft Sans Serif
12)
- 2 Read/Write
- 6 Read Only (will have a light gray BackColor)
- 2 List Boxes (both Microsoft Sans
Serif 10)
- 2 Buttons (both Microsoft Sans Serif
12)
Remember to point at objects in
Executable Computer Quote.exe to see Tool Tips
showing what the properties need to be.
-
Again, other than the different object names, the
Lab 2 code will be very similar to the practice,
which is in the VB Guide. Here are the recommended steps per
the VB Guide and tips (code
will only work when proper syntax and formatting is used):
-
Code
btnExit
-
Code
the Form to Clear all Text Boxes, Focus on the 1st Text Box (set
TabIndex for 1st 2), preselect 2 List Box headers
-
Code
lstDiscount only (lstChooseOne
does NOT require code)
-
Code
btnCompute:
If
condition [user cannot pay by Credit Card and
get a Discount] Then MsgBox Reset form like it Loads,
but don't Clear 2 Read/Write
Text Boxes or Focus Else [Calculations
in this order -
using proper coding
technique and Val statements for any txtBox used (on the right side) in an equation CDCost
= CD * 7.99 DVDCost = DVD * 13.99
Subtotal = CDCost + DVDCost Discount = Subtotal * Rate / 100
Total = Subtotal - Discount
|
|
Submit your work
(entire 2C Lab folder), using Digital Dropbox in
Blackboard -- as covered in class (instructions are
in the left column). |
|
| |
Visual Basic Notes 2:
We addressed
5 new items in this chapter:
-
Read
Only property for Text Boxes - users cannot type in or change
results in Read Only Text Boxes.
-
Lines
are created by simply using a Label with a Black BackColor and
minimizing the height.
-
"Error
Handling" within an If Then Else statement,
where If
through Else addresses errors:
- Message Boxes have the simple
format of MsgBox("your message")
So the code MsgBox("Messages Boxes are EASY!!!") yields
the message box to the right...
- Val (short for Value)
converts Text Boxes into values so they can be used
for math calculations.
Use the format Val(txtName.Text) for
ALL Text
Boxes to the right of "=" in math calculations.
Examples (notice Val is NOT used for actual numbers):
- txtTax.Text = Val(txtSubtotal.Text)
* 0.06
- txtTotal.Text = Val(txtSubtotal.Text)
+ Val(txtTax.Text)
|
 |
|
| |
Visual Basic Lab 1 (for students in Prof. Battilana's VB
Labs -- otherwise check with your CSC110 professor):
In your 1C Lab folder (within your student folder),
you will replicate Executable Computer Sale.exe. Use these and
steps in your VB Guide: |
|
|
 |
|
To submit your work
for a grade, you MUST use Digital Dropbox in
Blackboard -- we will cover
(instructions are
in the left column)
in class. |
|
|
|
Visual Basic Notes 1:
Interchangeable Terms used: Program = Project;
Window = (Business) Form; Instructions =
Code
VBDesigner.exe in your Student folder, is used to
create (Project / Program) Forms
and review
Properties and Code. You CAN design forms without the
VBDesigner using only Visual Basic -- the method for designing YOUR
forms will be determined by your professor.
-
NEVER double-click
using VBDesigner
-
NEVER use the Enter key
using VBDesigner
-
NEVER click on left side of VBDesigner then change any
property
Objects covered (in Phone Sale):
-
Labels
- do NOT contain code, and we let
VB create the default names (Label1, Label2, etc.)
-
TextBoxes
- do NOT contain code, and have the naming convention txtName
(VBDesigner puts in the txt)
-
ListBoxes
- DO contain code, we use the Click method , and have the
naming convention lstName (VBDesigner puts in the lst)
-
Buttons
- DO contain code, we use the Click method , and have the
naming convention btnName (VBDesigner puts in the btn)
-
Forms
- DO contain code, we use the Load method , and will
always be named Form1 for this course - do NOT change the
name
Methods and Properties allow programmers to refer one
object to another using code.
Code
is written using Visual Basic, so we open the folder where our
form was designed and saved, then double-click on the vbproj file:
|

(Note that if your computer is
set to hide file name extensions, .vbproj will not show
at the end of the file name, so remember that this is the only file
icon in the folder with the image of the Earth) |
|
Remember, we must first pick the object we are writing code
on from the Class Name list
 |
|
AND
pick from the Method Name list for the object (either Click
or Load for our course) BEFORE starting to type ANY code.
 |
Then we
can enter the code one object at a time, testing (Debugging) and saving
(Save All) each step of the way (see
your VB Guide). |
|
|
|
|
M & W 5:00-6:00 pm,
25 UNA 137 (or A025 if available)
|
CSC 110 Links
and Downloads |
Demo/Lab Programs
Visual Basic Express 2008
MyITLab
Getting Started (use IE browser)
Blackboard
WCU E-mail
Help
Desk
610-436-3349
Grade Estimator
(use IE browser) |