MCTS 70-526-CSHARP Short Notes: Exam Passing Tips

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

MCTS 70-526-CSHARP Short Notes: Exam Passing Tips

Rating:

Creating a UI for a Windows Forms Application by Using Standard Controls

  • Setting the MinimizeBox property of a Windows form to false prevents the minimize button from being displayed in the caption bar of the form.

  • Setting the MaximizeBox property of a Windows form to false prevents the maximize button from being displayed in the caption bar of the form.

  • Setting the FormBorderStyle property of a Windows form to one of the Fixed styles prevents the form from being resized.

  • The Anchor property of a control is used to define a consistent position of the control in its parent container. A control can be anchored to one or more edges of its container.

  • When the Dock property of a control is set to Left, the left edge of the control is docked to the left edge of its container i.e. a Windows form.

  • The PropertyGrid control displays properties for any object or type in a Windows form at design time.

  • The visual appearance of the user interface of a Windows form can be modified by using the Windows Forms Properties window.

  • The FormBorderStyle property of the Form class sets the default border style of a Windows form by setting its value to Sizable.

  • The Opacity property of the Form class sets the transparency of a Windows form. An opacity of 0 percent means the form is completely transparent or invisible and an opacity of 100 percent means the form is completely opaque or visible.

  • The CreateControl method of a GroupBox control is used to force the creation of a copy of the control with all its child controls.

  • The TabStop property of a control indicates whether the control will receive focus as the user tabs through a window by using the TAB key.

  • The AutoScroll property of a Panel control displays scroll bars when independent controls are hosted in the panel, but outside the visible bounds of the Panel control.

  • The Capture property of the ComboBox class is used to get or set a value that indicates whether or not a control has captured the mouse.

  • A method bound to an event is known as an event handler. It executes when the associated event is raised.

  • The following steps are taken to dynamically add a ListBox control to a form and make it visible:
    1. Create an object of the control.
    2. Set the Visible property of the control to true at design time.
    3. Add the ListBox object to the Controls collection of the form.

  • The Text property of the MenuItem class specifies the text to be displayed as the caption for a menu item.

  • The AddRange method of the Control.ControlCollection class is used to add an array of controls to a collection. It is also used to add a single control to a collection.

  • Shortcut keys or accelerator keys are keys or key combinations that users can press for quick access to actions they perform frequently.

  • The MaxLength property of a TextBox control is used to specify the maximum number of characters that can be entered into the text box control.

  • The TextBox control added dynamically to a Windows form has the default height and width. By default, the Visible property of the TextBox control is set to true.

  • ComboBox component is a standard HTML drop-down, scrollable list.

  • The top-level menu items can have the same access keys. If the same key is defined as an access key for more than one menu item, the user has to hold down the ALT key and the access key to move from one menu option to another.

  • Controls can be added to a Windows form at runtime via code.

  • Controls can be added to a Windows form at design time by four different techniques. They are as follows:
    1. Select View > Toolbox menu and double-click the control to be added.
    2. Select View > Toolbox menu, select the control to be added and double-click the form.
    3. Select a control in the View > Toolbox menu and draw it on the form with the help of the mouse.
    4. Select a control in the View > Toolbox menu and drag it to the form.

  • The IsCheckable property of the MenuItem class is used first in a Windows form, as it returns a value to indicate whether or not a MenuItem can be checked.

  • The IsChecked property of the MenuItem class is used after the IsCheckable property. It sets or returns a value to indicate whether or not the MenuItem is checked when a user clicks on the menu item.

  • The CloneMenu method of the MenuItem class can be used to create copies of the specified menu items.

  • The Select event of the MenuItem class is raised when a menu item is highlighted using a mouse or a keyboard. This event can be used to set the help text for menu items.

  • Context menus or pop-up menus are shortcut menus that appear only when a user clicks the right mouse button over a control or a form. They are built using the ContextMenu class.

  • LostFocus is an event of the Control class and occurs when a control loses input focus.

  • When the AddHandler method is called, it adds a handler to an event handler collection.

  • The MinimumSize property of the Form class is used to get or set the minimum size up to which a form can be resized.

  • The Size property of the Form class is used to get or set the size of a form.

  • Multiple events can share the same delegate type. Once a delegate type is declared for an event, the event is declared as a delegate type field.

  • The events of the Control class occur in the following order:
    1. Enter
    2. GotFocus
    3. Leave
    4. Validating
    5. Validated
    6. LostFocus

  • The AcceptButton property of a form is used to set up an accept button for a form. An accept button for a form is one whose click event is triggered when a user presses the ENTER key in an application regardless of the position of the cursor on the window.

  • The MouseEnter event occurs when the mouse pointer enters a specified control on a Windows form.

  • The MouseHover event occurs when the mouse pointer hovers over the control on a Windows form.

  • The Location property of the MouseEventArgs class obtains the location of the mouse during a mouse event generation. It returns a Point structure that contains the x and y coordinates of the mouse.

  • In a Windows form, keyboard input is processed by raising keyboard events in response to Windows messages. The three keyboard events that occur on a Windows form control in chronological order are KeyDown, KeyPress, and KeyUp.

  • The KeyDown event occurs only once, but the KeyPress event occurs multiple times as long as a user holds a key. The KeyDown event occurs first in a keyboard event and is followed by the KeyPress event.
Integrating Data in a Windows Forms Application

  • The TabStop property of a control indicates whether the control will receive focus when a user tabs through a window by using the TAB key on the keyboard.

  • The DataBindings property of the TextBox control is used to bind the control with the data source.

  • The SqlConnection.BeginTransaction method starts a database transaction.

  • The SqlTransaction.Connection property returns a SqlConnection object in association with a transaction that can take place for each new database connection.

  • The Connection Timeout parameter of the ConnectionString property specifies the time period (in seconds) required to wait for a connection to the server.

  • The Max Pool Size parameter of the ConnectionString property determines the maximum number of connections allowed in the connection pool.

  • The SqlDataAdapter class represents a set of data commands and a database connection that are used to fill a DataSet and update a SQL Server database.

  • The SqlCommand class represents a transact-SQL statement or stored procedure to be executed at a SQL Server database. The SqlConnection class represents an open connection to a SQL Server database.

  • The code MySqlReader["Name"] statement is used to retrieve data. Here, Name specifies the name of the field from where the data is to be accessed. The ordinal number of a field can also be used instead of the field name.

  • The ExecuteNonQuery method of the SqlCommand class is used to execute commands that changes a database. These commands include the Transact-SQL INSERT, UPDATE, DELETE, and SET statements.

  • The ExecuteScalar method of the SqlCommand class is commonly used to execute aggregate functions such as COUNT, SUM, etc., on a table.

  • The Read method of the SqlDataReader class advances the data reader to the next result. It returns true if there are more results to be returned, otherwise it returns false.

  • The CommandText property of the OleDbCommand class is used to get or set the stored procedure or SQL statement that is to be executed at the data source.

  • The Connection property of the OleDbCommand class is used to get or set the OleDbConnection that is used by an instance of the OleDbCommand class.

  • The SqlParameter constructor accepts two parameters, i.e., parameter name and its datatype.

  • The BeginExecuteNonQuery method of the SqlCommand class is used to initiate the asynchronous execution of a Transact-SQL statement or stored procedure that does not return rows.

  • BLOB stands for Binary Large Object. It stores and saves data such as a video clipping, graphics, and images in binary format in a database.

  • The DataSet and DataRelation objects are used to create a relationship between these two databases to retrieve records.

  • The GetChanges method of the DataSet class returns a copy of the DataSet, containing all changes made to the DataSet since it was last loaded, or since the DataSet.AcceptChanges method was called.

  • The RowStateFilter property of the DataView class is used to filter rows based on their state, such as ModifiedCurrent, ModifiedOriginal, CurrentRows, etc. Users can get data from multiple versions by using the boolean OR operator with the RowStateFilter property.

  • The DataViewRowState.ModifiedCurrent value for the RowStateFilter property is used to display the modified version of the original data.

  • The RowFilter property of the DataView class is used to get or set the expression to filter the rows to be viewed in a DataView object. The expression for this property includes a column name defined in a database table, an operator, and a value to filter on.

  • The Clone method is used to copy the structure of the DataTable. It includes schemas and constraints, but it does not include DataRow of a DataTable object.

  • The Update method of the DataAdapter class is used to call an INSERT, DELETE, or UPDATE statement for each inserted, deleted, or updated row in a DataSet from a DataTable.

  • DiffGram is an XmlWriteMode value and it specifies that a DataSet has to be written as a DiffGram containing current and original values.

  • The Copy method of the DataSet class copies both the structure and data of a DataSet object. It returns a new DataSet object having the same structure that includes all DataTable schemas, relations, and constraints and data as the existing DataSet object.

  • When an application is executed, all type mismatch errors will be caught during compile time by creating an XML schema for a specified table and then by creating a typed DataSet object based on this schema.

  • The DataRowState value that is stored in the RowState property of the DataRow class, specifies whether the DataRow object is added, deleted, detached, modified, or unchanged.

  • The proper approach to synchronize a DataSet object with an XmlDataDocument object is to first populate the DataSet object with data and then to synchronize it with the XmlDataDocument object.

  • The DataRelation class is used to relate two DataTable objects to each other through DataColumn objects.

  • The Merge method of the DataSet class is used to incorporate the latest changes from a data source into an existing DataSet object.

  • In the Dataset1.Tables["Table1"].Rows[2].Item["Name"]; statement, the Tables collection with the parameter value Table1 specifies the table from which data is to be accessed. The Rows collection is used to specify the record to be accessed. The element index of the Rows collection starts with 0. The Item collection with the parameter value Name specifies the name of the field from which data is to be accessed.

  • A constructor of the DataRelation class is used to create a DataRelation object that represents the parent/child relationship between two tables. This DataRelation object is then passed as a parameter to the Add method, which adds the object to the data relation collection of the DataSet.

  • The SqlDataAdapter(QueryString1, conn) constructor initializes a new instance of the SqlDataAdapter class with a SQL query string variable and a SqlConnection object. This SqlDataAdapter constructor requires a minimum amount of code.

  • The WriteXmlSchema method of the DataSet class creates an XML Schema Definition (XSD) file from the DataSet object. This method writes the DataSet structure as an XML Schema.

  • An XML document must have only one top-level element known as document element or root element. Each element must have both a start tag and an end tag.

  • An XML document consists of two main parts, namely prolog and document.

  • The AppendChild method of the the XmlAttribute class is used to add a specified node to the end of child node list.

  • The xml data type is a built-in data type in SQL Server 2005. As with other built-in data types such as int and varchar, a user can define the xml data type on a column when he creates a table.

  • The OuterXml property of the XmlNode class is used to retrieve the markup representing an XML node and its children nodes.

  • The Save method of the XmlDocument class is used to save an XML document to a specified file or location.

  • The XmlNode class derived from the System.Xml namespace is a representation of a single node in an XML document. It is the base class in the XML DOM, and supports XPath selections and provides editing capabilities.

  • The Load method of the XmlDocument class is used to load the contents of an XML file into an XmlDocument object. It always preserves significant white space. It does not perform document type definition (DTD) or schema validation.

  • The XmlDocument class that defines within the System.Xml namespace is used to represent an XML document.

  • The ImportNode method of the XmlDocument class is used to import the node from another XML document.

  • The XmlReader class defines properties that are used to retrieve information about the name and content of the current node.

  • The Namespace property of the DataSet class is used to specify the namespace of a DataSet object.

  • SQL Server 2000 supports the FOR XML clause with the SELECT statement. The FOR XML clause instructs the SELECT statement to return the query result in an XML format instead of a tabular format.

  • The WriteXml(string, XmlWriteMode) method of the DataSet class is used to write XML schema and data from a DataSet object in XML format.

  • An XmlReader class is created to display the XML file from a database.

  • The Read method is implemented in order to read data from the XML file.

  • To validate XML data by using the XmlValidatingReader class is now obsolete in .NET Framework 2.0. The XmlReader class is used to validate XML data instead of the XmlValidatingReader class.
Implementing Printing and Reporting Functionality in a Windows Forms Application

  • The PrintPreviewControl displays a PrintDocument exactly as it would appear on printing. This control does not provide any button or other user interface elements.

  • The page details for printing a document is set by using the EnableMetric property of the PageSetupDialog component.

  • The HasMorePages property of the PrintPageEventArgs object specifies whether or not to print an additional page.

  • The PrintDialog control is a graphical interface that allows a user to select a printer and specify other print settings for an associated PrintDocument object. It is a non-visual control.

  • The AllowSelection property of a PrintDialog control returns a value to indicate whether or not the Selection option button is enabled when the Print dialog box is displayed.

  • The AllowSomePages property of a PrintDialog control returns a value to indicate whether the Pages option button is enabled or disabled when the Print dialog box is displayed.

  • The print job is initiated by implementing the Print method of the PrintDocument component.

  • The PrintPage event of the PrintDocument component is raised when the current page content of a document is send to the printer.

  • The Document property sets or returns a value of a PrintDocument object representing the document to be previewed.

  • The PrintPreviewControl control displays a document as it will appear while printing.

  • The Columns property of the PrintPreviewControl control sets a value to indicate the number of pages displayed horizontally on the computer screen. The default value is set to one.

  • The Rows property of the PrintPreviewControl control sets a value to indicate the number of pages displayed vertically on the computer screen. The default value is set to zero.

  • The UseAntiAlias property of the PrintPreviewControl control is set to true in order to determine whether the text of a document appears to be smooth while print previewing.

  • The Zoom property of the PrintPreviewControl control is set to establish the zoom level when the document preview appears.
Enhancing Usability

  • A drag-and-drop functionality refers to the transferring of data with the mouse. It enables a user to drag data such as a text, an image, or other object with the mouse's left-button from one control and drop it to another control.

  • Source control events occur when a mouse pointer triggers some action on a source control.

  • Target control events occur when a mouse pointer triggers some action on a target control.

  • The CultureInfo class is used to represent information about a specific culture including the language, the writing system, the calendar used, etc.

  • The foreach (CultureInfo culture in CultureInfo.GetCultures(CultureTypes.AllCultures)) statement lists all the cultures that come with the .NET Framework including neutral cultures, specific cultures, cultures in the Windows system, and custom cultures.

  • The principles of accessibility design are flexibility, user choice of input and output methods, consistency, and compatibility with accessibility aids that can be integrated into the user interface.

  • The AccessibleDefaultActionDescription accessibility property describes the default action of a Windows Forms control. It cannot be set at design time, but it can only be set in a form's code.

  • The AccessibilityObject accessibility property is a read-only property. It can be set when a control is added to a Windows form.

  • The five accessibility requirements for creating an accessible Windows-based application are: support standard system settings, support high contrast option, provide keyboard access, expose keyboard focus location, and avoid using sound mode alone while conveying information.

  • An MDI parent form is created by setting the IsMdiContainer property to true in the Properties window of a Windows form.

  • The LayoutMdi method is used to arrange the MDI child forms within the MDI parent form.

  • The Active property of a ToolTip control determines whether the ToolTip control is currently active or not.

  • The properties of a Windows Form control can be set by using the PropertyGrid control at runtime.

  • The VScrollBar control represents a vertical scroll bar within the ScrollBar control. The HScrollBar control represents a horizontal scroll bar within the ScrollBar control.

  • The Maximum property of the ProgressBar control sets the maximum value of the range of the control. It specifies the upper limit of the Value property.
Implementing Asynchronous Programming Techniques to Improve the User Experience

  • The RunWorkerAsync method of the BackgroundWorker component starts execution of a background operation by raising the DoWork event.

  • The RunWorkerCompleted event of the BackgroundWorker component is raised to announce the completion a background operation.

  • The WorkerSupportsCancellation property of the BackgroundWorker component sets or obtains a value to indicate whether the BackgroundWorker object supports asynchronous cancellation. When the property value is true, the CancelAsync method is called in order to interrupt a background operation.

  • The two main tasks to handle an asynchronous process are as follows:
    1. The server component must be able to send a message to the client application when the process is complete.
    2. Client applications must be able to receive messages.

  • The System.Threading namespace provides interfaces and classes that enable multithreaded programming in XML.
Developing Windows Forms Controls

  • A method can be added to a control in the following two ways:
    1. A void method is created when a method does not return a value.
    2. A return type method is specified when a method returns a value.
Configuring and Deploying Applications

  • In the .NET Framework version 2.0, the ClickOnce deployment technique is most appropriate for deploying Windows-based applications.

  • ClickOnce is a deployment technology that allows a user to create self-updating Windows-based applications.

  • Following are the steps to add an existing Setup project in an application.
    1. On the File menu, select Add Project > Existing Project menu option.
    2. In the Add Existing Project dialog box, click the Browse button to specify the location of the project.
    3. Click the Open button.

  • The Launch Condition tab in the Project Properties dialog box is used to specify the conditions for installation. These conditions can be used in conjunction with a file, registry, or component search.

  • The Data and Settings Management category of the Windows XP logo specifies that an application must provide custom settings as per-user.

  • The Installutil.exe tool can be used to install multiple assemblies at a time. It performs installation in a transactional manner.

  • In order to ensure that a SQL script executes during the installation process, add the script as a custom action in the Setup project.

  • The File System editor can be used to add project outputs to a deployment project. It can be used to specify the location on the target computer where files are to be installed, and to create shortcuts on the target computer.

  • The Custom Actions editor is used to define custom actions that can execute code at the end of an installation process to perform actions, such as the installation of location-specific files, which cannot be handled during installation.

  • The User Interface editor allows a developer to change the visual screen, which a user sees while installing the application.

  • Custom actions of the Windows installer allow developers to execute code during an installation process to perform actions such as pre-compiling an assembly during installation, creation of a local database, etc.


Rating:



Other articles

Click here to Article home

 
uCertify.com | Our Company | Articles | Privacy | Security | Contact Us | News and Press Release | uCertify India
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.