Busy. Please wait.
or

show password
Forgot Password?

Don't have an account?  Sign up 
or

Username is available taken
show password

why


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
We do not share your email address with others. It is only used to allow you to reset your password. For details read our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
Don't know
Know
remaining cards
Save
0:01
To flip the current card, click it or press the Spacebar key.  To move the current card to one of the three colored boxes, click on the box.  You may also press the UP ARROW key to move the card to the "Know" box, the DOWN ARROW key to move the card to the "Don't know" box, or the RIGHT ARROW key to move the card to the Remaining box.  You may also click on the card displayed in any of the three boxes to bring that card back to the center.

Pass complete!

"Know" box contains:
Time elapsed:
Retries:
restart all cards
share
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

Chapter 15

Graphical User Interfaces with Windows Forms: Part 2

TermDefinition
Menus Provide groups of related commands for Windows Forms apps. Organize commands without "cluttering the Gui"
Parent Menu A menu that contains a menu item is called that menu item's parent menu
Alt Key Shortcuts Menus can have Alt key shortcuts(also called access shortcuts, keyboard shortcuts, or kotkeys), which are accessed by pressing Alt and the underlined letter - for example, Alt + F typically expands the File menu
Creating a Menu To create a menu, open the Toolbox and drag a MenuStrip control onto the Form
Adding Menu Items To add menu items to the menu, click the Type Here TextBox and type the menu item's name. This action adds an entry to the menu of type ToolStripMenuItem.
Creating Access Shortcut To create an access shortcut, type an ampersand(&) before the character to be underlined. For example, to create the File menu item with the letter F underlined, type &File. To display and ampersand, type &&
ShortcutKeys Property Used to add other shortcut keys for menu items
ShowShortcutKeys You can hide the shortcut keys by setting this property false
ShortcurKeyDisplayString Used to modify how the shortcut keys are displayed in the menu item
Separator Bars Used to group menu items logically. Inserted by right clicking the menu and selecting Insert > Separator or b typing "-" for the text of a menu item
MenuStrip Property 1. Property[RightToLeft]..Description[Causes text to display from right to left. This is useful for languages that are read from right to left]
1. ToolStripMenuItem Property 1. Property[Checked]..Description[Indicates whehter a menu item is checked. The default value is false, meaning that the menu is unchecked]...
2. ToolStripMenuItem Property 2. Property[CheckOnClick]..Description[Indicates that a menu item should appear checked or unchecked as it is clicked]...
3. ToolStripMenuItem Property 3. Property[ShortcutKeyDisplayString]..Description[Specifies text that should appear beside a menu item for a shortcut key. If left blank, the key names are displayed. Otherwise, the text in this property is displayed for the shortcut key]...
4. ToolStripMenuItem Property 4. Property[ShortcutKeys]..Description[Specifies the shortcut key for the menu item]... 5. Property[ShowShortcutKeys]..Description[Indicates whether a shortcut key is shown beside menu item text, The default is true, which displays the shortcut key]...
5. ToolStripMenuItem Property 6. Property[Text]..Description[Specifies the menu item's text. To create an Alt access shortcut, precede a character with &]
Common ToolStripMenuItem Event 1. Event[Click]..Description[Generated when an item is clicked or a shortcut key is used. This is the default event when the menu is double clicked in the designer]
MonthCalendar Control Displays a monthly calendar on the Form
1. MonthCalendar Properties 1. Property[FirstDayOfWeek]..Description[Sets which day of the week is the first displayed for each week in the calendar]... 2. Property[MaxDate]..Description[The last date that can be selected]...
2. MonthCalendar Properties 3. Property[MaxSelectionCount]..Description[The maximum number of dates that can be selected at once]... 4. Property[MinDate]..Description[The first date that can be selected]...
3. MonthCalendar Properties 5. Property[MonthlyBoldedDates]..Description[An array of dates that will be displayed in bold in the calendar]... 6. Property[SelectionEnd]..Description[the last of the dates selected by the user]...
4. MonthCalendar Properties 7. Property[SelectionRange]..Description[The dates selected by the user]... 8. Property[SelectionStart]..Description[The first of the dates selected by the user]
Common MonthCalendar Event 1. Event[DateChanged]..Description[Generated when a date is selected in the calendar]
DateTimePicker Control Similar to the MonthCalendar control but displays the calendar when a down arrow is selected
1. DateTimePicker Properties 1. Property[CalendarForeColor]..Description[Sets the text color for the calendar]... 2. Property[CalendarMonthBackground]..Description[Sets the calendar's background color]...
2. DateTimePicker Properties 3. Property[CustomFormat]..Description[Sets the custom format string for the date and/or time displayed in the control]... 4. Property[Format]..Description[Sets the format of the date and/or time used for the date and/or time displayed in the control.
3. DateTimePicker Properties Specifies the user's selection options using the DateTimePickerFormat enumeration. The values in this enumeration are Long(Thursday, July 10, 2013), Short(7/10/2013), Time(5:31:02 PM), and Custom.
4. DateTimePicker Properties If value Custom is used, the display in the DateATimPicker is specified using property CustomFormat}... 5. Property[MaxDate]..Description[The maximum date and time that can be selected]...
5. DateTimePicker Properties 6. Property[MinDate]..Description[The minimum date and time that can be selected]... 7. Property[ShowCheckBox]..Description[Indicates if a CheckBox should be displayed to the left of the selected date and time]...
6. DateTimePicker Properties 8. Property[ShowUpDown]..Description[Indicates whether the control displays up and down Buttons. Helpful when the DateTimePicker is used to select a time - the Buttons can be used to increase or decrease hour, minute, and second]...
7. DateTimePicker Properties 9. Property[Value]..Description[Stores a DateTime object, which always contains both date and time info. You can retrieve the date information from the DateTime object by using the property Date, and the time information by using the TimeOfDay property]
Common DateTimePicker Event 1. Event[ValueChanged]..Description[generatd when the Value property changes, including when the user selects a new date or time]
LinkLabel Control Displays links to other resources, such as files or web pages
1. Common LinkLabel Properties 1. Property[ActiveLinkColor]..Description[Specifies the color of the active link when the user is in the process of clicking the link. The default color(typically red) is set by the system]...
2. Common LinkLabel Properties 2. Property[LinkArea]..Description[Specifies which portion of text in the LinkLabel is part of the Link]... 3. Property[LinkBehavior]..Description[Specifies the link's behavior, such as how the link appears when the mouse is placed over it]...
3. Common LinkLabel Properties 4. Property[LinkColor]..Description[Specifies the original color of the link before it's been visited. The default color(typically blue) is set by the system]...
4. Common LinkLabel Properties 5. Property[LinkVisited]..Description[If true, the link appears as through it has been visited(its color is changed to that specified by property VisitedLinkColor). The default value is false]...
5. Common LinkLabel Properties 6. Property[Text]..Description[Specifies the control's text]... 7. Property[UseMnemonic]..Description[If true, the & character in the Text property acts as a shortcut(similar to the Alt shortcut in menus)]...
6. Common LinkLabel Properties 8. Property[VisitedLinkColor]..Description[Specifies the color of a visited link. The default color(typically purple) is set by the system]
Common LinkLabel Event 1. Event[LinkClicked]..Description[generated when the link is clicked. this is the default event when the control is double clicked in Design mode]
Start Method The method Start of class Process(namespace System.Diagnostics), which allows you to execute other programs, or load documents or we sites from an app. E: System.Diagnostics.Process.Start("notepad");
ListBox Control The ListBox control allows the user to view and select from multiple items in a list. ListBoxes are static GUI entities, which means that users cannot directly edit the list of items
CheckedListBox Control Extends a ListBox by including CheckBoxes next to each item in the list. Allows users to place checks on multiple items at once, as is possible with CheckBox controls
1. Common ListBox Properties 1. Property[Items]..Description[The collection of items in the ListBox]... 2. Property[MultiColumn]..Description[Indicates whether the ListBox can display multiple columns. Multiple columns eliminate vertical scrollbars from the display]...
2. Common ListBox Properties 3. Property[SelectedIndex]..Description[Returns the index of the selected item. If no items have been selected, the property returns -1. If the user selects multiple items, this property returns only of the selected indices.
3. Common ListBox Properties If multiple items are selected, use property SelectedIndices]... 4. Property[SelectedIndices]..Description[Returns a collection containing the indices for all selected items]...
4. Common ListBox Properties 5. Property[SelectedItem]..Description[Returns a reference to the selected item. If multiple items are selected, it can return any of the selected items]...
5. Common ListBox Properties 6. Property[SelectedItems]..Description[Returns a collection of the selected item(s)]... 7. Property[SelectionMode]..Description[Determines the number of items that can be selected and the means through which multiple items can be selected.
6. Common ListBox Properties Values None, One(the default), MultiSimple(multiple selection allowed), or MultiExtended(multiple selection allowed using a combination of arrow keys or mouse clicks and Shift and Ctrl keys)...
7. Common ListBox Properties 8. Property[Sorted]..Description[Indicates whether items are sorted alphabetically. Setting this property's value to true sorts the items. The default value if false]
Common ListBox Methods 1. Method[ClearSelected]..Description[Deselected every item]... 2. Method[GetSelected]..Description[Returns true if the item at the specified index is selected]
Common ListBox Event 1. Event[SelectedIndexChanged]..Description[Generated when the selected index changed. This is the default event when the control is double clicked in the designer]
Adding Items to ListBoxes and CheckedListBoxes To add items to a ListBox or to a CheckedListBox, we must add object to its Items collection.. For example, we could write myListBox.Items.Add(myListItem); to add string myListItem to ListBox myListBox
1. Common CheckedListBox Properties 1. Property[CheckedItems]..Description[Accessible only at runtime. Returns the collection of items that are checked as CheckedListBox.CheckedItemCollection. This is distinct from the selected item, which is highlighted(but not necessarily checked)
2. Common CheckedListBox There can be at most one selected item at any given time]... 2. Property[CheckedIndices]..Description[Accessible only atruntime. Returns indicies for all checked items as a CheckedListBox.CheckedIndexCollection]...
3. Common CheckedListBox 3. Property[CheckOnClick]..Description[When true and user clicks an item, the item is both selected and checked or unchecked. By default, this property is false, which means that user must select an item, then click it again to check or uncheck it]...
4. Common CheckedListBox 4. Property[SelectionMode]..Description[Determines whether items can be selected and checked. The possible values are One(the default; allows multiple checks to be placed) or None (does not allow any checks to be placed)]...
Common CheckedListBox Method 1. Method[GetItemChecked]..Description[Takes an index and returns true if the corresponding item is checked]
Common CheckedListBox Event 1. Event[ItemCheck]..Description[Generated when an item is checked or unchecked]
1. ItemmCheckEventArgs Properties 1. Property[CurrentValue]..Description[Indicates whether the current item is checked or unchecked. Possible values are Checked, Unchecked, and Indeterminate]...
2. ItemmCheckEventArgs Properties 2. Property[Index]..Description[Returns the zer-based index of the item that changed]... 3. Property[NewValue]..Description[Specifies the new state of the item]
ComboBox Control The ComboBox control combines TextBox features with drop-down list - a GUI component that contains a list from which a value can be selected. Usually appears as a TextBox with a down arrow to its right
1. Common ComboBox Properties 1. Property[DropDownStyle]..Description[Determines the type of ComboBox. Value Simple means that the text portion is editable and the list portion is always visible.
2. Common ComboBox Properties Value DropDown(default) means the text portion is editable but the user must click an arrow button to see the list portion. Value DropDownList means that the text portion is not editable and the user must click the arrow button to see list portion]...
3. Common ComboBox Properties 2. Property[Items]..Description[The collection of items in the ComboBox control]... 3. Property[MaxDropDownItems]..Description[Specifies the maximum number of items(1 to 100) that the drop-down list can display.
4. Common ComboBox Properties If the number of items(1 to 100) that the drop-down list can display. If the number of items exceeds the maximum number of items to display, a scrollbar appears]...
5. Common ComboBox Properties 4. Property[SelectedIndex]..Description[Returns the index of the selected item, or -1 if none are selected]... 5. Property[SelectedItem]..Description[Returns a reference to the selected item]...
6. Common ComboBox Properties 6.. Property[Sorted]..Description[Indicates whether items are sorted alphabetically. Setting this property's value to true sorts the items. The default is false.]
Common ComboBox Event 1. Event[SelectedIndexChanged]..Description[Generated when the selected index changed(such as when a different item is selected). This is the default event when control is double clicked in the designer]
1. DropDownStyle Determines the type of ComoBox and is represented as a value of the ComboBoxStyle enumeration, which contains values Simple, DropDown, and DropDownList. Simple does not display a drop-down arrow. A scrollbar appears next to the control.
2. DropDownStyle Style DropDown(default) displays a drop-down list when the down arrow is clicked(or the down arrow key is pressed). A user can type a new item in the ComboBox.
3. DropDownStyle The last style is DropDownList, which displays a drop-down list but does not allow the user to type in the TextBox
TreeView Control Displays nodes hierarchically in a tree. Traditionally, nodes are objects that contain values and can refer to other nodes
Parent Node Contains child nodes. Child nodes can be parents to other nodes
Sibling Nodes Child nodes that have the same parent node
Root Node The first parent node of a tree
1. Common TreeView Properties 1. Properties[CheckBoxes]..Description[Indicates whether CheckBoxes appear next to nodes. A value of true displays CheckBoes. The default value is false]...
2. Common TreeView Properties 2. Properties[ImageList]..Description[Specifies an ImageList object containing the node icons. An ImageList object is a collection that contains Image objects]...
3. Common TreeView Properties 3. Properties[Nodes]..Description[Returns the collection of TreeNodes in the control as a TreeNodeCollection. It contains methods Add, Clear, and Remove. Removing a parent node deletes all its children]...
4. Common TreeView Properties 4. Properties[SelectedNode]..Description[The selected node]
Common TreeView Event(Event Arguments TreeViewEventArgs) 1. Event[AfterSelect]..Description[Generated after selected node changes. This is the default event when the control is double clicked in the designer]
1. Common TreeNode Properties 1. Property[Checked]..Description[Indicates whether the TreeNode is checked(CheckBoxes property must be set to true in the parent TreeView)]...
2. Common TreeNode Properties 2. Property[FirstNode]..Description[Specifies the first node in the Nodes collection(the first child in the tree)]... 3. Property[FullPath]..Description[Indicates the path of the node, starting at the root of the tree]...
3. Common TreeNode Properties 4. Property[ImageIndex]..Description[Specifies the index in the TreeView's ImageList of the image shown tree]... 5. Property[LastNode]..Description[Specifies the last node in the Nodes collection(the last child in the tree)]...
4. Common TreeNode Properties 6. Property[NextNode]..Description[Next sibling node]... 7. Property[Nodes]..Description[Collection of TreeNodes contained in the current node(all children of current node). Contains methods Add, Clear, and Remove]...
5. Common TreeNode Properties 8. Property[PrevNode]..Description[Previous sibling node]... 9. Property[SelectedImageIndex]..Description[Specifies the index in the TreeView's ImageList of the image to use when the node is selected]...
6. Common TreeNode Properties 10. Property[Text]..Description[Specifies the TreeNode's text]
1. Common TreeNode Methods 1. Method[Collapse]..Description[Collapses a node]... 2. Method[Expand]..Description[Expands a node]... 3. Method[ExpandAll]..Description[Expands all the children of a node]...
2. Common TreeNode Methods 4. Method[GetNodeCount]..Description[Returns the number of child nodes]
Adding A Root Node To add a toor node ot TreeView myTreeView, write...myTreeView.Nodes.Add(new TreeNode(rootLabel));... where myTreeView is the TreeView to which we are adding nodes, and rootLabel is the text to display in myTreeView
Adding Children to Root Node To add children to a root nodes, add new TreeNodes to its nodes collection. We select the appropriate root node from the TreeView by writing...myTreeView.Nodes[myIndex]... where myIndex is the root node's index in myTreeView's Nodes collection
Class Path Provides functionality for working with string that are file or directrly paths
ListView Control Similar to a ListBox in that both display lists from which the user can select one or more items. ListView is more versatile ad can display items in different formats
1. Common ListView Properties 1. Property[Activation]..Description[Determines how th user activates an item. This property takes a value in the ItemActivation enumeration. Possible values are OneClick, TwoClick, and Standard]...
2. Property[CheckBoxes]..Description[Indicates whether items appear with CheckBoxes. true displays CheckBoxes. The default is false]... 3. Property[LargeImageList]..Description[Specifies the ImageList containing large icons for display]...
4. Property[Items]..Description[Returns the collection of ListViewItems in the control]... 5. Property[MultiSelect]..Description[Determines whether multiple selection is allowed. The default is true, which enables multiple selection]...
6. Property[SelectedItems]..Description[Returns the collection of selected items as a ListView.SelectedListViewItemCollection]... 7. Property[SmallImageList]..Description[Specifies the ImageList containing small icons for display]...
8. Property[View]..Description[Determines appearance of ListViewItems. Possible values are LargeIcon(default7), SmallIcon, List, Details, and Tile]
Created by: TimC#Programming