CSC110 CHAPTER 311/2/2018
Name______
Objects:
Textbox:
- Primary Use______
- Properties most frequently changed ______
- The text property is what kind of data? ______
- The size of the text box can be changed in what directions? ______
- What Property can I change so that I can add more than one line of data to my textbox? ______
- What property can I change so that all the data stored in the text box can be viewed?______
- What property do I change when I want to use a textbox as an output object? ______
Label:
- What is the primary use of a label?______
- Properties most frequently changed?______
- Can we store data in a label object?______
- Can I store an image in a label object?______
- When an image is inserted into the label, where does the text property appear?______
Button:
- What is the primary use of a button object? ______
- Can you insert an image on a button object?______
- Changing the backcolor property of your button does what?______
ListBox
- What is the primary use of a Listbox object? ______
- Can you insert an image on a listbox object?______
- Changing the forecolor property of your button does what?______
- What are two methods commonly used with a listbox? ______
Prefixes: What are the prefixes for the following objects?
Object / PrefixLabel
Textbox
Button
Listbox
Checkbox
Option button
Picture
Form
Documentation
- What are comments?______
- Where should the appear? ______
- What four comments should you place at the beginning of each program?
- ______
- ______
- ______
- ______
Events:
- What is an event? ______
- How can you get the default event to appear in the coding window?
- ______
- What do we call the first statement of every event? ______
- Event coding structure in VB.Net should have a closing statement. What is the name of the statement and how should it end? ______, ______
- Write the procedure declaration statement for a change event for txtFirstName ______
- What part of this statement can be changed? ______
- The keyword Private indicates the focus of the procedure. What focus does a private procedure have?______
- Can a procedure have other levels of focus?______, what?______
- Do objects have focus?______, what kinds of focus? ______
Coding Window:
- How do you bring up the coding window? ______
- There are two dropdown boxes in the coding window, what are they called and what do they contain?
- ______
- ______
- Where does the programmers code procedures begin? ______
- When you type the name of an object in the coding window and place a period to the right of the object name, a dropdown box appears. What is contained in this box?______
- How can you tell properties and methods apart in your code? ______
- properties can be compared to what part of speech? ______
- methods can be compared to what part of speech?______
- Write a statement and use a property to clear the input for the object txtAddress.
- ______
- Rewrite the above statement using a method.
- ______
- You can display the font properties of the textbox object to the screen at run time. Can the font properties of a textbox be changed in the coding window to change at run time? ______
- Where should you change the font properties of objects?______
- What event will be generated for you in the coding window when you double click on a label object from the user interface form? ______
- What event will be generated for you in the coding window when you double click on a listbox object from the user interface form? ______
- What statement is used to display data and string text in objects at runtime?
- ______
- What statement is used to change property values at runtime?
- ______
- How do you disable the textbox? ______
- How do you remove the textbox from the form at runtime? ______
Numbers:
Type name / Prefix / Upper RangeDouble
Long
Integer
Currency
Single
Short
Number Arguments
- What characters can be used in a numeric argument name? ______
- What does the word dimension refer to? ______
- Declare an argument to hold the class average and give it an appropriate variable type.______
- What variable type is intrinsic to the textbox text property? ______
- If you want to store the data typed into a textbox in a numeric argument what must you do?
- ______
Numeric type conversion functions
Type name / New Conversion function / Value in textbox / OutcomeDouble / 136.50 * 25
Long / 32500 * 10.5
Integer / 32500 * 10.5
Currency / $5.00
Single / 125.456213879
CType is a generic type conversion function, what does it do and how does it work______
What is the order of operations for numeric calculation
______
What is the outcome of these equations?
Equation / Outcome / Explain what operation come first7+3 * 10 / 2+5 -8 / 19
((7+3) * 10 / (2+5)) -8 / 6.29
3 + 4 * 5 / 23
(3 + 4) * 5 / 35
1/2^3 / 0.13
1/(2^3) / 0.13
Strings:
- What characters can be used in a string argument name? ______
- How does a string argument differ from a numeric argument? ______
- Write the dimension state to declare an argument to hold the last name of a student in a student database. ______
- Rewrite the statement to set the initial value to “Richard Prior”
- List two string methods. ______
- List three string function:
- ______
- what does it do? ______
- ______
- what does it do?______
- ______
- what does it do? ______
- Write the appropriate statement to store the concatenated result of str1, str2, str3 in the text property of txtOutput. ______
- What does the & do to the strings? ______
- What is another use for the & symbol in VB? ______
- Looking at the following statement:
Dim a, b, c, as String
- What will be the outcome?______
- What if anything is wrong with the following statements:
TxtPrice.Font.Bold = True
Dim dblPrice as Double = “$150.00”
Dim shoPopulation as Short = 32768
TxtOutput.Text = str1 + str2 + str3
dblQuote = txtQuote.text
1. What are the open modes for sequential files access? ______
2. What modes allow the program to write to the file? ______
3. What mode allows the program to read from the file? ______
4. Write the dimension statement creating the StreamReader object which will open the “college.txt” file to be read from the disk. ______
5. What is the name of your read argument for StreamReader? ______
6. What method for the sr argument would you use to read the first data instance from the file? ______
7. What method would you use to add data to the file? ______
8. Write the dimension statement to open the file to write new records to the bottom of the college file. ______
9. What argument did you use for the StreamWriter? ______
10. What mode is the file opened to? ______
11. Create a With Block to add three student records to the lstOutPut list box. Clear the object first.