C# GUI Forms / Inheritance / Polymorphism Flashcards
What does the label control do?
Displays images or uneditable text.
What does the TextBox control do?
Enables the user to enter data via the keyboard. It also can be used to display editable or uneditable text.
What does the Button control do?
Triggers an event when clicked with the mouse.
What does the checkbox control do?
Specifies an option that can be selected (checked) or unselected (not checked)
What does the combobox control do?
Provides a drop-down list of items from which the user can make a selection either by clicking an item in the list or by typing in a box.
What does the listbox control do?
Provides a list of items from which the user can make a selection by clicking one or more items.
What does the panel control do?
A container in which controls can be placed and organized
What does the numericupdown control do?
Enables the user to select from a range of numeric input values.
What is a form?
What happens when you drag an item from the toolbox onto the form?
Visual studio generates code that created the object and set its basic properties. The IDE maintains the generated code in a separate file using partial classes
What is the accept button property?
Default button thats clicked when you press enter
What is the auto scroll property?
bool value (false by default) that allows or disallows scrollbars when needed.
What is the cancelbutton property?
Button thats clicked when the escape key is pressed
What is the formborderstyle property?
Border style for the form (sizable by default).
What is the font property?
Font of text displayed on the form, and the default font for controls added to the form.
What is the text property?
Text in the forms title bar
What is the close method?
Closes a form and releases all resources, such as the memory used for the forms content. A closed form cannot be reopened.
What is the hide button?
Hides a form, but does not destroy the form or release its resources.
What does the show method do?
Displays hidden form.
What does the load even do?
Occurs before a form is displayed to the user.
What is an event handler?
GUIs are event driven. When the user interacts with a GUI component, the event drives the program to perform a task. A method that performs a task in response to an even it called an event handler.
What does an event handler look like?
How do you create the default event handler for a form control?
Double click on the form control.
What are the two parameter every event handler receives when its called?
Where is the auto generated GUI code placed in visual studio?
in the Designer.cs file of the form
How would you modify the GUI controls?
What is a delegate?
What is a multicast delegate?
What is another way to create event handlers?
Another Way to Create Event Handlers is Using the Properties Window to Create Event Handlers Controls can generate many different events. Clicking the Events icon (the lightning-bolt icon) in the Properties window (Fig. 14.8), displays all the events for the selected control.
How do you search for a controls documentation in Visual Studio?
How do you change the controls background colour?
with the BackColor property
How do you edit the controls baground image?
with the BackgroundImage property
What does the enabled property do?
What does the focused property do?
Indicates whether the control has the focus (only available at runtime)
how do you choose what font is used to display the controls text?
the font property
How do you choose what the controls foreground color is?
The ForColor property. This usually determines the color of the text in the Text Property
What does the TabIndex property do?
The tab order of the control. Then the tab key is pressed, the focus transfers between controls based on the tab order. You can set this order.
What does the TabStop property do?
If true, then a user can give focus to this control via the Tab key
What does the text property do?
The text associated with control. The location and appearance of the text vary depending on the type of control.
What does the visible property do?
Indicates whether the control is visible
What method hides the control?
The Hide method
What method acquires the focus?
the Select method
What method shows the control?
the Show method
What is anchoring and how does it work?
What does the anchoring window look like?
What is docking?