Term
In this type of application, each line in Main() is executed sequentially and then the program halts |
|
Definition
|
|
Term
A notification from the operating system that an action, such as the user clicking the mouse or pressing a key, has occurred. |
|
Definition
|
|
Term
Once this type of application is launched, it sits in a process loop and waits for an event to occur |
|
Definition
|
|
Term
With Windows applications, you write methods called _______ methods to indicate what should be done when an event occurs |
|
Definition
|
|
Term
The front end of a program is called a(n) ______ and is the visual image you see when you run a program |
|
Definition
|
|
Term
Graphical user interfaces (GUI's) include: |
|
Definition
- Menus - Text in many different colors and sizes - Other controls (pictures, buttons, etc) |
|
|
Term
Objects that can display and respond to user interaction are called: |
|
Definition
|
|
Term
The place where most of the classes for developing Windows-based applications are organized |
|
Definition
The System.Windows.Forms namespace |
|
|
Term
The _____ definition includes not only the class name, but a colon followed by another class name |
|
Definition
|
|
Term
IN the class heading of a windows form class, the first class (before the colon) is called the ____ and the second class (after the colon) is called the _____ |
|
Definition
- derived class - base class |
|
|
Term
What type of class is this an example of:
public class Form1 : Form |
|
Definition
|
|
Term
In a Windows form class heading definition, derived classes inherit from the __________ |
|
Definition
|
|
Term
A property for setting/getting title bar caption. It can also be used in a constructor |
|
Definition
|
|
Term
Windows forms/controls off many properties including: |
|
Definition
Text, Color, Font, and Location |
|
|
Term
In a C# application, execution begins in the _____ |
|
Definition
|
|
Term
The Main() method is located in the ___ file for the application |
|
Definition
|
|
Term
The _____ method places the application in a process loop |
|
Definition
|
|
Term
Explain the following:
using System.Windows.Forms; (a) namespace Windows0 { public class Form1 (b): Form (c) { public Form1() (d) { Text = "Simple Windows Application"; (e) } static void Main() { Form1 winForm = new Form1(); Application.Run(winForm); (f) } } |
|
Definition
(a) New namespace referenced (b) derived class (c) base class (d) constructor (e) sets title bar caption (f) starts process loop |
|
|
Term
Elements of Good Design (design considerations) |
|
Definition
- Consistency - Alignment - Avoid clutter - Color - Target Audience |
|
|
Term
Steps to create a new Windows-Based Application using Visual Studio |
|
Definition
(1)Select File > New Project (2)Select the Windows Forms Application template (3)Browse to location where you want to store your work |
|
|
Term
The top-level window for an application is called a _____ |
|
Definition
|
|
Term
Windows Forms have an extensive collection of _____ classes |
|
Definition
|
|
Term
Each Windows Form control class has a large collection of _____ and _____ |
|
Definition
|
|
Term
The property of a Windows Forms control class can be selected from an alphabetized list called a ______ |
|
Definition
|
|
Term
To add code to respond to events such as button clicks, go to the Properties window, select the _____ icon (Events), then double-click on the event name to generate the code |
|
Definition
|
|
Term
When double-clicking on an event name in the properties window in order to generate code, the following happens: |
|
Definition
- The event is registered as being of interest - A heading is added for the event-handler method |
|
|
Term
When is this code added as the last line to the InitializeComponenet() method in the Form1.Designer.cd file:
this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing); |
|
Definition
When you double-click on the FormClosing event in the Event properties Windows list |
|
|
Term
The IDE separates the source code into three files. What are they? |
|
Definition
- Form1.cs (normally this is the only.u one you edit)
- Form1.Designer.cs (holds the auto generated code)
- Program.cs (contains the Main() method, where execution always begins |
|
|
Term
These two files both include partial class definitions for the Form1 class: |
|
Definition
Form1.cs Form1.Designer.cs |
|
|
Term
All Windows forms controls are _____ that each come with their own predefined properties and methods |
|
Definition
|
|
Term
Each Windows Form control fires an ____ |
|
Definition
|
|
Term
Each _____ is derived from the System.Windows.Forms.Control class |
|
Definition
|
|
Term
The two procedures to place controls onto a Windows Form |
|
Definition
From the toolbox either (1) double-click on the control or (2) drag and drop the control |
|
|
Term
_____ provide descriptive text or labels for other controls |
|
Definition
|
|
Term
What does this do?
Label labelName - new Label(); |
|
Definition
Instantiates a label object |
|
|
Term
What does this do?
this.Controls.Add(labelName); |
|
Definition
Adds a label control to the form |
|
|
Term
Some properties of the Label Control class include: |
|
Definition
Text, TextAlign, Font, Location |
|
|
Term
These objects are used to enter data or display text during run time and can be used for both input and output |
|
Definition
|
|
Term
What does this code do?
TextBox textBoxName = new TextBox(); |
|
Definition
instantiates a TextBox object |
|
|
Term
What does this code do?
this.Controls.Add(TextBoxName); |
|
Definition
|
|
Term
Some properties of the Textbox Control class include: |
|
Definition
MultiLine, ScrollBars, MaxLength, PasswordChar, CharacterCasing |
|
|
Term
A button event enables a user to click a ____ to perform a task. |
|
Definition
|
|
Term
If a button has a(n) _______ method and is registered as an event to which your program is planning to respond, the _____ method is called automatically when the button is clicked. |
|
Definition
|
|
Term
Some properties of the Button Control class include: |
|
Definition
Text, Enabled, Focused, TabIndex |
|
|
Term
Some guidelines for naming Controls (coding standards) |
|
Definition
- Consistency - use appropriate prefix for controls (btn, txt, lbl, etc) |
|
|
Term
_____ store references (addresses) to methods, as opposed to storing actual data |
|
Definition
|
|
Term
_____ form the foundation for events in C# |
|
Definition
|
|
Term
Declaration of a delegate looks more like a _____ than a class definition |
|
Definition
|
|
Term
A delegate declaration has no ____ |
|
Definition
|
|
Term
A Declaration begins with the keyword ____ |
|
Definition
|
|
Term
A Declaration ends with a ______ |
|
Definition
parenthesized list of parameters |
|
|
Term
Unlike a method, the return type of a delegate becomes part of its identifying _____ |
|
Definition
|
|
Term
The below code is an example of?
delegate string ReturnSimpleString(); |
|
Definition
A Delegate declaration statement |
|
|
Term
Identifies what types of methods the delegate represents |
|
Definition
|
|
Term
What are three examples of methods that return a string but require no argument. |
|
Definition
static string EndStatement()
static string ToString()
static string ReturnSaying() |
|
|
Term
You associate delegates with methods by creating ________ |
|
Definition
|
|
Term
What is this code an example of:
ReturnSimpleString saying3 = new ReturnSimpleString(EndStatement); |
|
Definition
An example of associating a delegate with a method by creating an instance |
|
|
Term
The Constructor for a delegate of the delegate class always takes a _______ |
|
Definition
|
|
Term
The delegate base class type is defined in the ____ namespace |
|
Definition
|
|
Term
The _____ references the method sent as an argument to the constructor. Any use of the _____ now calls the method. |
|
Definition
|
|
Term
____ are said to be wrapped by the delegate |
|
Definition
|
|
Term
A Delegate that can wrap more than one method is called a _____ |
|
Definition
|
|
Term
Multicast delegate must have a return type of _____ |
|
Definition
|
|
Term
+= and -= operators are used to add/remove methods to/from the delegate ____ or _____ list |
|
Definition
|
|
Term
Delegates are used for _____ applications |
|
Definition
|
|
Term
In a event-driven application, delegates act act as intermediaries between ____ that are raising or triggering an event |
|
Definition
|
|
Term
Of of the main advantages of the delegate is: |
|
Definition
The same Delegate can call different methods during run time. |
|
|
Term
True or False:
The reason why delegates work so well in an event-driven application is because when the program is compiled, the method or methods that will be called are not determined. |
|
Definition
|
|
Term
True or false:
A delegate serves as a bridge with event-driven applications. It acts as an intermediary between objects that are raising or triggering an event, and the object that captures the event and responds to it. |
|
Definition
|
|
Term
Event wiring consists of steps: |
|
Definition
(1) The click event is registered as being of interest. (2) An event-handler method is generated |
|
|
Term
True or false:
To wire an event means to associate (identify) a method to handle its event |
|
Definition
|
|
Term
What does this code do?
this.button1.Click += new System.EventHandler(this.button1_Click);
explain this code |
|
Definition
This code associates a method with a delegate.
The System.EventHandler is a delegate type.
button1.Click and button2.Click are methods
the keyword "this" is added to all code generated by VS to indicate the current instance of a class. |
|
|
Term
A ____ displays a list of items for single or multiple selections. A scroll bar is automatically added when the totoal number of items exceeds the number that can be displayed |
|
Definition
|
|
Term
You can add or remove items from a ____ at design time or dynamically at run time |
|
Definition
|
|
Term
ListBox has a number of properties and events. The ____ property is used to set initial values. |
|
Definition
|
|
Term
To add items to a ListBox click on ______ |
|
Definition
|
|
Term
The ListBox Name property is useful to set for _____ |
|
Definition
|
|
Term
The ListBox Sorted property is set to ____ to avoid having to type values in sorted order |
|
Definition
|
|
Term
To add functionality you need to _____ and event for the ListBox control object |
|
Definition
|
|
Term
What does double-clicking on any control object do? |
|
Definition
Registers its default event for the control |
|
|
Term
The default event for ListBox is: |
|
Definition
|
|
Term
What property would you use to retrieve string data from a ListBox object? |
|
Definition
|
|
Term
What does this code do?
this.txtBoxResult.Text = this.lstBoxEvents.Text; |
|
Definition
Retrieves ListBox string data and stroes it in a textbox object |
|
|
Term
What does this code do?
lstBoxEvents.Items.Add(txtBoxNewAct.Text); |
|
Definition
Adds an item to a ListBox at runtime |
|
|
Term
In many cases ListBox controls and _____ controls can be used interchangeably |
|
Definition
|
|
Term
True or false:
ListBox control is usually used when you have all the choices available at design time |
|
Definition
|
|
Term
True or false:
ComboBox facilitates displaying a list of suggested choices with an added feature |
|
Definition
|
|
Term
ComboBox objects contain their own _____ field as part of the object |
|
Definition
|
|
Term
ComboBox only allows a ______ selection to be made |
|
Definition
|
|
Term
What happens when you register the KeyPress() event-handler method? |
|
Definition
The event is fired with every keystroke |
|
|
Term
Menus offer the advantage of: |
|
Definition
taking up minimum space on your window. |
|
|
Term
True or false:
Menus enable you to add more functionality to your application through offering additional options to the user |
|
Definition
|
|
Term
A collection of records stored in a computer in a systematic way, so that a computer program can consult it to answer questions |
|
Definition
|
|
Term
Computer programs used to manage and query databases |
|
Definition
Database Management Systems (DBMS) |
|
|
Term
SQL Server, Oracle, and MS Access are all examples of what? |
|
Definition
Database Management Systems |
|
|
Term
Many DBMSs store data in _______ format |
|
Definition
|
|
Term
Data in tables are related through common data field _____ |
|
Definition
|
|
Term
DBMSs typically use a query language to program database access. This query language is called _______ |
|
Definition
Structured Query Language (SQL) |
|
|
Term
|
Definition
|
|
Term
The .NET data access technology for accessing data in databases is called _____ |
|
Definition
|
|
Term
To retrieve data using ADO.NET you must first ______ to the database |
|
Definition
|
|
Term
ADO.NET uses a feature called ____ to connect, execute commands, and retrieve results from a database |
|
Definition
|
|
Term
True of False:
ADO.NET Database Providers include MS SQL Server, Oracle, Object Linking and Embedding Database (OLEDB)(Applications that use Access), and Open Database Connectivity (ODBC)(Applications supported by earlier versions of VS) |
|
Definition
|
|
Term
True or False:
ADO.NET Data Providers are encapsulated into a namespace by provider |
|
Definition
|
|
Term
Four core classes make up each data provider namespace. These four classes are: |
|
Definition
- Connection - Command - DataReader - DataAdapter |
|
|
Term
What does this code do?
using System.Data.OldDb; |
|
Definition
Allows you to use the OleDb class so that you can connect to an MS Access database |
|
|
Term
True or False:
When you instantiate an object of the connection class you send a connection string that includes the actual database provider and the data source (name of the database). |
|
Definition
|
|
Term
One way to retrieve records programatically is to issue an _____ |
|
Definition
|
|
Term
ADO.NET includes data reader classes which are used to ____ |
|
Definition
read rows of data from a database |
|
|