Chapter 5 Flashcards
What is a Windows Forms Application?
Windows Forms Application - smart client applications that consist of one or more forms, displaying a visual interface to the user. They integrate well with the OS, use connected devices and can work whether connected to the internet or not.
What is a Windows Form?
Windows Form - visual surface capable of displaying a variety of controls. Visual Studio provides a drag and drop Windows Forms designer to easily create applications.
What is a control?
Control - distinct user interface element that accepts input from or displays output to the user.
Forms provide a built in collection of controls, can also add custom controls or 3rd party controls.
What is event handling in a UI programme?
Event handling plays key role in user interface based programming. Respond to various events that are fired from user actions to make programs interactive.
Windows Forms applications form and controls expose a set of predefined events. When event occurs, the code associated with the event handler is invoked.
What is the syntax for adding a delegate?
Syntax for adding a delegate is += operator. This is due to fact .NET supports multicast delegates in which a delegate can be bound to more than one method. This allows one to many notifications when an event is fired.
What is visual inheritance?
Visual Inheritance - allows you to reuse existing functionality and layout for Windows Forms.
What event model does Windows Forms use?
Windows forms event model uses the .NET Framework delegates to bind events to respective event handler.
How does visual inheritance apply to a Windows Form?
Windows Form is essentially another class therefore inheritance applies to it. However when applied to a Windows Form, it causes the inheritance of all visual characteristics of the form such as size, colour and controls placed on it. You can visually manipulate the properties that are inherited from base class and is often called visual inheritance.
What is a Multiple Document Interface?
Multiple Document Interface (MDI) - applications in which multiple child windows reside under a single parent window. They allow multiple windows to share a single application menu and toolbar e.g. Excel with multiple worksheets open.
What is a Single Document Interface?
Single Document Interface (SDI) - each window contains its own menu and toolbar, rely on the OS to provide window management e.g. Windows switching among multiple windows in the taskbar.
Can programs make use of both a MDI and SDI?
Yes, many application make use of both MDI and SDI e.g. Word opens in SDI but allows users to open multiple windows.
What property must be set for a parent form in a MDI?
In code important to set the IsMdiContainer property to true for parent form.
What property must be set for each child form in a MDI?
Each child form must set the MdiParent property to specify the parent form.
What is the purpose of the MdiWindowListItem property?
MdiWindowListItem property of the menu strip indicates which menu item will display list of child windows.
What is the LayoutMdi method used to achieve?
LayoutMdi method is used by menu items in the Window to arrange the child windows e.g. tiled horizontally or vertically, cascaded or as icons.
What are console based applications?
Console based applications - do not have a graphical user interface and use a text mode console window to interact with the user.
Where are console based applications run from?
Console based application run from console window.
How do you input and output in a console based application?
Input via command line parameters.
Output written to command window as well.
What are windows services?
Windows service is an application that runs in the background and does not have any user interface.
What kind of services are Windows Services?
Usually a long running process that do not provide direct user interaction, can be started, paused, restarted and stopped.Examples include Web server listening for incoming requests or print spooler.
Where must all Windows Services derive from?
All Windows Services must derive from the ServiceBase class.
What methods of the Service base class can be overridden?
Can override base class OnStart, OnStop, OnPause and OnContinue methods.