1. Trang chủ
  2. » Công Nghệ Thông Tin

Lý thuyết trắc nghiệm windows forms

14 728 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 14
Dung lượng 284,5 KB

Nội dung

Windows Form Which of the following is not a possible value for the RowState property of a DataRow object? a) Added b) Altered c) Deleted d) Modified The Windows Form classes are located in the namespace a) System.Windows.Forms c) System.WinForms b) System.WindowsForms d) Windows.Forms The _ argument and the _ argument are always passed as parameters to events for a control (choose 2) a) System.Object b) System.EventArgs c) System.EventHandler d) System.Controls You have Visual Studio NET to develop a Windows-based application that interacts with a Microsoft SQL Server database Your application contains a form name EmployeeForm You add the following design-time component to the form + SqlConnection object name EmpConn + SqlDataAdapter object name EmpDA + DataSet object name EmpDS + Five TextBox controls to hold the values exposed by EmpDS At design-time, you set DataBindings property of each TextBox control to appropriate column in the DataTable object of EmpDS When you test this application you can successfully connect to the database However, no data is displayed in any TextBox You need to modify your application code ensure that data is displayed appropriately Which behavior should occur while the EmployeeForm.Load event handler is running? a) Execute the BeginInit method of EmpDS b) Execute the Open method of EmpConn c) d) Execute the FillSchema method of EmpDA and pass in EmpDS Execute the Fill method of EmpDA and pass in EmpDS Which of the following events is best suitable to validate the data? a) KeyUp b) Validated c) Validating LostFocus d) You use Visual Studio NET to create a Windows-based application The application includes a form name CertK, which displays statistical date in graph format You use a custom graphing control that does not support resizing You must ensure that users cannot resize, minimize or maximize CertK Which three actions should you take? (choose 3) a) Set CertK.MinimizeBox to False b) Set Cert.MaximizeBox to false c) d) Set Cert.ControlBox to false Set Cert.ImeMode to Disabled FPT-Aptech confidential Page 10 e) Set Cert.WindowState to Maximized f) Set Cert.FormBorderStyle to one of the Fixed Styles You develop a Visual Studio NET application that dynamically adds controls to its form at runtime You include the following statement at the top of your file: using System.Windows.Forms; In addition, you create the following code to add Button controls: Button tempButton = new Button(); tempButton.Text = NewButtonCaption; tempButton.Name = NewButtonName; tempButton.Left = NewButtonLeft; tempButtonTop = NewButtonTop; this.Controls.Add(tempButton); tempButton.Click += new EventHandler(ButtonHandler); Variables are passed into the routine to supply values for the Text, Name, Left, Top properties When you compile this code, you receive an error message indicating that ButtonHandler is not declared You need to add a ButtonHandler routine to handle the Click event for all dynamically added Button controls Which declaration should you use for ButtonHandler? a) public void ButtonHandler() b) public void ButtonHandler(System.Windows.Forms.Button sender) c) public void ButtonHandler(System.Object sender) d) public void ButtonHandler(System.Windows.Forms.Button sender, System.EventArgs e) e) public void ButtonHandler(System.Object sender, System.EventArgs e) Your application uses a DataSet object to maintain a working set of data for your users Uses frequently change information in the DataSet object Before you update your database, you must run data validation code on all user changes You need to identify the data rows that contain changes First you create a DataView object What should you next? a) Set the RowStateFilter.CompareTo method b) Set the RowStateFilter.Equals method c) Set the RowStateFilter property to CurrentRow d) Set the RowStateFilter property to ModifiedCurrent You need to develop a Windows form that provides online help for users You want the help functionality to be available when users press F1 key Help text will be displayed in a popup window for the textbox has focus To implement this functionality, you need to call a method of HelpProvider control and pass the text box and the help text What should you ? a) SetShowHelp b) SetHelpString c) SetHelpKeyword d) ToString You use Visual Studio Net to develop a Windows-based application Your application will display customer order information from a Microsoft SQL Server database The orders will be display on Windows Form that includes a DataGrid control which is bound to a DataView object Users will be able to edit order information directly in the DataGird control You must give users the option of displaying only edited customer orders and updated values in the DataGrid What should you do? a) Set the RowStateFilter property of the DataView object to DataViewRowState.ModifiedOriginal b) Set the RowStateFilter property of the DataView object to DataViewRowState.ModifiedCurrent FPT-Aptech confidential Page 11 c) Set the RowFilter property of the DataView object to DataViewRowState.ModifiedOriginal d) Set the RowFilter property of the DataView object to DataViewRowState.ModifiedCurrent You use Visual Studio.Net to develop a Microsoft Windows-based application Your application contains a form named CustomerForm, which is includes the following design-time controls: • SQL Connection object named CustConnection • SQL DataAdapter object named CustDataAdapter • DataSet object named CustomerDataSet • Five TextBox controls to hold the values exposed by CustomerDatSet • Button control named saveButton At design time you set the DataBindings properties of each TextBox control to the appropriate column in the DataTable object of CustomerDataSet When the application runs, users must be able to edit the information displayed in the text boxes All user changes must be saved to the appropriate database when saveButton is executed The event handler for saveButton includes the following code segment: CustDataAdapter.Update(CustomerDataSet); You test the application However, saveButton fails to save any values edited in the text boxes You need to correct this problem What should your application do? a) Call the InsertCommand method of CustDataAdapter b) Call the Update method of CustDataAdapter and pass in CustConnection 12 c) Before calling the Update method, ensure that a row position change occurs in CustomerDataSet d) Reestablish the database connection by calling the Open method of CustConnection You are deploping a Window-based application that logs hours worked by employees Your design goals require you to maximize application performance and minimize impact on server resources Your need to implement a SqlCommand object that will send a SQL INSERT action query to a database each time a user makes a new entry To create a function named LineItemInsert, you write the following code (Line numbers are included for reference only) 01 : public int LineItemInsert(int empID, int projectID, 02 : decimal hrs, SqlConnection con) 03 : { 04 : string SQL; 05 : int Ret; 06 : 07 : SQL = String.Format ( 08 : “INSERT INTO TimeEntries (EmpID, ProjectID, Hours)” 09 + 10 : “VALUES ({0},{1},{2})”, 11 : empID, projectID, hrs); 12 : SqlCommand cmd = new SqlCommand(SQL, con); 13 : 14 : //Insert new code 15 : } You code must execute the SQL INSERT action query and verify the number of database records that are affected by the query Which code segment should you add on line 14 ? a) con.Open(); Ret = cmd.ExecuteNonQuery(); con.Close(); return Ret; b) c) con.Open(); Ret = cmd.ExecuteScalar(); con.Close(); return Ret; SqlDataReader reader; con.Open(); reader = cmd.ExecuteReader(); con.Close(); return reader.RecordsAffected; SqlDataReader reader; con.Open(); reader = cmd.ExecuteReader(); con.Close(); return reader.GetValue(); d) FPT-Aptech confidential Page The _ event of the Form control is used to perform tasks such as allocating resources used by the form 13 a) b) c) d) Activate Load Allocate Activated When a Data Form is created using the Data Form Wizard, which of the following classes are used by default? (choose ) 14 a) OleDbDataReader b) OleDbConnection c) OleDbCommand d) OleDbDataWriter e) OleDbDataAdapter To create an instance of the Font class using existing Font and FontStyle, the constructor is: 15 a) public Font(Font f, FontStyle fs); b) public Font(string fontname, float size); c) public void Font(Font f, FontStyle fs); d) public void Font(string fontname, float size); Which control is used to display a short, customized help message for individual controls on a form? 16 a) ToolClass b) HelpTool c) HelpText d) ToolTip Statement 1: Tree View displays folders, drives etc Statement 2: List View displays current folder contents 17 a) Both the statements are true b) Only Statement is true c) Only Statement is true d) both the statements are false Which class represents shortcut menus that can be displayed when the user clicks the right mouse button over a control or area of the form? 18 19 a) Menu b) FileMenu c) ContextMenu d) ToolsMenu Name the object which notifies other objects about an event? FPT-Aptech confidential Page 20 a) Publisher b) Subscriber c) Consumer d) Tester Leo would like to populate a select dropdown combo box with data in a data store He wants a fast, forward only, read-only database connection using ADO.NET Given the above scenario, which one of the following objects should Leo use? a) A DataAdatpter object c) A DataReader object b) A Command object d) A Connection object Which class is the base class for all the controls that can be used in Windows Forms? 21 a) Objects b) Forms c) Controls d) Control Which of the following statements about event handlers is not true? 22 a) Event handlers cannot be removed dynamically b) Event handlers are methods that handle events c) Event handlers can handle multiple events d) Multiple event handlers can be associated with an event Which of the following namespaces defines the Trace and Debug classes? 23 a) System.Diagnostics b) System.Collection c) System.Security d) System.ComponentModel By setting the _ in a control, I can make sure that my code is not change if someone inherits my form 24 25 a) the Private value of the Modifiers property b) the Unchanged value of the Modifiers property c) the Restricted value of the Modifiers property d) the Limited value of the Modifiers property You are using Visual Studio.Net to develop a Windows- based application that contains a single form This form contains a label control named labelUser and a textbox control named textUser, labelUser displays a caption that identifies the purpose of textUser You want to write code that enables users to place focus in textUser when they press Alt + U This key combination should be identified to users in the display of labelUser Which actions should you take? (choose 3) FPT-Aptech confidential Page 26 27 28 a) Set labelUser.UserMnemonic to True b) Set labelUser.CauseValidation to True c) Set textUser.CauseValidation to True d) Set textUser.TabIndex to exactly one number more than labelUser.TabIndex e) Set labelUser.Text to “&User” You have created a Class Library of Custom User controls and Forms You want to use this class library as the foundation for your Windows application project How can you reference it? a) In the class View, right click on the project and select “Add Inherited Control” for user controls or select “Add Inherited Form” for Forms Name the component and click Open.Select component in the inheritance picker dialog box b) In the Solution Explorer, right-click on the project and select “Add Inherited Control” for user controls or select “Add Inherited Form” for Forms Name the component and click Open.Select component in the inheritance picker dialog box c) From the Menu select “Project\ Add Inherited Control” for user controls or select “Project\ Add Inherited Form” for forms Name the component and click Open Select component in the inheritance picker dialog box d) From the Menu select “Build\ Add Inherited Control” for user controls or select “Build\ Add Inherited Form” for forms Name the component and click Open Select component in the inheritance picker dialog box You use Visual Studio.Net to develop a Windows-based application for a women’s college Your application will display student’s information from a Microsoft SQL Server database The information will be displayed on a Windows Form in a data grid named dg1 DataGrid1 is bound to a DataView object The Windows form includes a button control named displayStudent When users click this button, dgl must display only student information whose PaidFees value is set to True How would you achieve this? a) Set the RowFilter property of the dg1 object to “PaidFees = True” b) Set the RowStateFilter property of the dg1 object to “PaidFees = True” c) Set the RowFilter property of the DataView object to “PaiFees = True” d) Set the RowStateFilter property of the DataView object to “PaiFees = True” You use Visual Studio.Net to create a Windows-based application The application includes a form that several controls, including a button named exitButton After you finish designing the form, you select all controls and then select Lock Controls from the Format menu least possible effort, and without disrupting the other controls First you select exitButton in the Windows Forms Designer What should you next? a) Set the Locked property to False Set the Size property to the required size Set the Locked property to True b) Set the Locked property to False Use this mouse to resize the control Set the Locked property to True c) Set the Size property to the required size d) Use this mouse to resize the control FPT-Aptech confidential Page 29 30 31 You develop a Windows-based application that includes the following code segment (Line numbers are included for reference only) 01 private void Password_Validating(object sender, 02 System.ComponentModel.CancelEventArgs e) 03 { 04 if(ValidCertKingPassword() == false) 05 { 06 // insert new code 07 } 08 } You must ensure that users cannot move control focus away from textPassword if ValidCertKingPassword returns a value of False You will add the required code on line a) e.Cancel = true; b) sender = name; c) password.AcceptsTab = false; d) password.CausesValidation = false; You use Visual Studio.Net to create a data entry form The form enables users to edit personal information such as address an telephone number The form contains a text box named textPhoneNumber If a user enters an invalid telephone number, the form must notify the user of the error You create a function named IsValidPhone that validates the telephone number entered You include an ErrorProvider control named ErrorProvider1 in your form Which additional code segment should you use? a) private void textPhone_Validating(object sender, System.ComponentModel.CancelEventArgs e) { if(!IsValidPhone()) { errorProvider1.SetError(textPhone, “Invalid Phone”); }} b) private void textPhone_Validated(object sender, System.EventArgs e) { if(!IsValidPhone()) { errorProvider1.SetError(textPhone, “Invalid Phone”); }} c) private void textPhone_Validating(object sender, System.ComponentModel.CancelEventArgs e) { if(!IsValidPhone()) { errorProvider1.GetError(textPhone); }} d) private void textPhone_Validated(object sender, System.EventArgs e) { if(!IsValidPhone()) { errorProvider1.GetError(textPhone); }} e) private void textPhone_Validating(object sender, System.ComponentModel.CancelEventArgs e) { if(!IsValidPhone()) { errorProvider1.UpdateBinding(); }} f) private void textPhone_Validated(object sender, System.EventArgs e) { if(!IsValidPhone()) { errorProvider1.UpdateBinding(); }} You develop a Windows-based application Its users will view and edit employee attendance data The application uses a DataSet object named customerDataSet to maintain the data while users are working with it After a user edits data, business rule validation must be performed by a middle-tier component named Certk Component You must ensure that your application sends only edited data rows from customDataSet to CertK Component Which code segment should you use? a) DataSet changeDataSet = new DataSet(); if(customDataSet.HasChanges) { CertK Component.Validate(changeDataSet); } FPT-Aptech confidential Page b) c) d) 32 33 DataSet changeDataSet = new DataSet(); if(customDataSet.HasChanges) { CertK Component.Validate(customDataSet); } DataSet changeDataSet = customDataSet.GetChanges(); CertK Component.Validate(changeDataSet); DataSet changeDataSet = customDataSet.GetChanges(); CertK Component.Validate(customDataSet); You develop a new sales analysis application that reuses existing data access components One of these components returns a DataSet object that contains the data for all customer orders for the previous years You want your application to display orders for individual product numbers Users will specify the appropriate product numbers at runtime What should you do? a) Use the DataSet.Reset method b) Set the RowFilter property of the DataSet object by using a filter expression c) Create a DataView object and set the RowFilter property by using a filter expression d) Create a DataView object and set the RowStateFilter property by using a filter expression You develop a Windows-based application which uses a DataSet object that contains two DataTable objects The application will display data from two data tables One table contains customer information, which must be displayed in a data-bound ListBox control The other table contains order information which must be displayed in a DataGrid control You need to modify the application to enable the list box functionality What should you do? a) Use the DataSet.Merge method b) Define primary keys for the Data Table objects c) Create foreign key constraint on the DataSet object d) Add a DataRelation object to the Relations collection of the DataSet object You use Visual Studio.Net to create a control that will be used on serveral forms in your application It is a custom label control that retrieves and displays your company’s current stock price The control will be displayed on many forms that have different backgrounds You want the control to show as much of the underlying forms as possible You want to ensure that only the stock price is visible The rectangular control itself should not be visible You need to add code to the Load event of the control to fulfill these requirements Which two code segments should you use? (Each correct answer presents part of the solution Choose 2) 34 a) this.BackColor = Color.Transparent; b) this.ForeColor = Color.Transparent; c) this.BackImage = null; d) this.SetStyle(ControlStyles.UserPaint, false); e) this.SetStyle(ControlSyles.SupportsTransparentBackColor, true); When a Windows Application project is created in Visual C#, a form is created automatically with the class name as 35 a) Class1 b) Form1 c) Form0 d) ClassA FPT-Aptech confidential Page The and class has properties that hold the SQL statements to select, insert, update and delete data from the database (choose 2) 36 a) OleDbDataAdapter b) SqlDataAdapter c) OracleDataAdapter d) OdbcDataAdapter The method is used to create the Graphics object 37 a) CreateGraphics b) Create c) CreateGraph d) DrawGraph The _ event of the PrintDocument class is trigged immediately before each PrintPage event occurs 38 a) QueryPageSettings b) PrintPage c) BeginPrint d) StartPrint is used to display text or data in the form of nodes arranged in a hierarchical order? 39 a) ListView b) TreeView c) TaskView d) NodeView Which namespace does the class ListView belong to? 40 a) System.Windows.Drawing b) System.Windows.Forms c) System.Windows.Paints d) System.Windows.Lists Which of the following statements are True with respect to Data Set in ADO.Net? (choose 2) 41 a) DataSet is an in-memory cache of records that can be visited/ modified any direction b) The DataSet is a read only cursor c) A DataSet can contain only two data tables at a time corresponding to a database table or view d) A DataSet constitutes a “disconnected” view of the data present in the database FPT-Aptech confidential Page Select the features of a good user interface? (choose 3) 42 a) Easy to learn b) Easy to use c) Attractive d) Easy to develop e) Colorful Which class is the base class for all the controls that can be used in Windows Forms? 43 a) Objects b) Forms c) Controls d) Control Which of the following techniques for creating a control is the easiest and least time-consuming? 44 a) Inheriting from an existing control b) Inheriting from UserControl c) Inherting from Control d) Creating from scratch Which of the following types of error occurs when the compiler is unable to compile a code? 45 a) Syntax error b) Runtime error c) Logical error d) Debugging error The property will allow you to loop through the collection of MdiChild forms in your application You can use the property to determine the number of open MdiChildren in your application 46 47 a) MdiChildren, MdiChildren.Length b) MdiForms, MdiForms.Length c) MdiChild, MdiChild.Length d) MdiChildren, MdiChildren.No You are developing an ERP application for Customer Officer You are working on the e-mail form of the Windows application You use the TabControl control and want it to always fill the forms You also want the form to be resizable How can you efficiently implement this feature? FPT-Aptech confidential Page 10 a) Set the Anchor property of the TabControl control to Top, Bottom b) Set the Dock property of the frmIssueDescription form to Fill c) Set the Dock property of the TabControl control to Left, and set the Anchor property to Right d) Set the Dock property of the TabControl control to Fill What happens when you assign the same access key to more than one menu item in the same menu group? 48 a) Nothing happens b) You cannot assign the same access key to more than one menu item c) Pressing the access key will switch between the items with the same access key, and the user must press ENTER to select the items If this access key is used, the first item in the menu that has the access key assigned to it will be selected d) 49 50 You create a Windows Forms named CertKing Form This form enables users to maintain database records in a table named CertKing You need to add several pairs of controls to CertKing Form You must fulfill the following requirements: • Each pair of controls must represent one column in the CertKing table • Each pair must consist of a TextBox control and a Label control • The LostFocus event of each TextBox control must call a procedure named UpdateDatabase • Additional forms similar to CertKing Form must be created for other tables in the database • Application performance must be optimized • The amount of necessary code must be minimized What should you do? a) Create and select a TextBox control and a Label control Write the appropriate code in the LostFocus event of the TextBox control Repeatedly copy and paste the controls into CertKing form until every column in the CertKing table has a pair of controls Repeat this process for the other forms b) Add a TextBox control and a Label control to CertKing Form Write the appropriate code in the LostFocus event of the TextBox control Create a control array form the TextBox control and the Label control At runtime, add additional pairs of controls to the control array until every column in the CertKing table has a pair of controls Repeat this process for the other forms c) Create a new user control that includes a TextBox control and a Label control Write the appropriate code in the LostFocus event of the TextBox control For each column in the CertKing table, add one instance of the user control to CertKing Form Repeat this process for the other forms d) Create a new ActiveX control that includes a TextBox control and a Label control For each column in the CertKing table, add one instance of the ActiveX control to CertKing Form Repeat this process for the other forms You use Visual Studio.Net to develop a Windows-based application that contains a single form This form contains a Label control named labelTKValue and a TextBox control named textTKValue labelValue displays a caption that identifies the purpose of textTKValue You want to write code that enables users to place focus in textTKValue when they press ALT+V This key combination should be identified to users in the display of labelTKValue Which three actions should you take? (Each correct answer present part of the solutions? a) Set labelTKValue.UseMnemonic to True b) Set labelTKValue.Text to “&Value” c) Set labelTKValue.CauseValidation to True d) Set textTKValue.CausesValidation to True e) Set textTKValue.TabIndex to exactly one number less than labelValue.TabIndex f) Set textTKValue.TabIndex to exactly one number more than labelValue.TabIndex FPT-Aptech confidential Page 11 51 You develop an application that enables users to enter and edit purchase order details The application includes a Windows Form named Display CertKing Form The application uses a clientside DataSet object to manage date The DatatSet object contains a Data Table object named CertKing Details This object includes one column named Quantity and another named UnitPrice For each item on a purchase order, your application must display a line item total in a DataGrid control on Display CertKing Form The line item is the product of Quantity times UnitPirce Your database design dose not allow you to store calculated values in the database You need to add code to you Form_Load procedure to calculate and display the line item total Which code segment should you use? a) DataColumn totalColumn = new DataColumn(“Total”, Type.GetType(“System.Decimal”)); CertKing Details.Columns.Add(totalColumn); totalColum.Expression = “Quantity * UnitPrice”; b) DataColumn totalColumn = NewDataColumn(“Total”,Type.GetType(“System.Decimal”)); CertKing Details.Columns.Add(totalColumn; TotalColumn.Equals(“Quantity* UnitPrice” ); c) CertKing Details.DisplayExpression(“Quantity * Unitprice”); d) 52 53 54 CertKing Details.DisplayExpression(“quantityColumn * unitPriceColumn) You use Visual Studio Net to create a form that includes a submenu item named helpTKOption In the Click event handler for helpOption, you write code to open a Web browser loaded with a context sensitive Help file You add a ContextMenu item named ContextMenu1 to the form ContextMenu1 will be used for all controls on the form Now you need to add code to the Popup event handler for ContextMenu1 Your code will create a popup menu that offers the same functionality as help TKOption You want to use the minimum amount of code to accomplish this goal Which two code segment should you use? (Each correct answer present part of the solution.) a) ContextMenu1.MenuItems.Clear(); b) ContextMenu1.MenuItems.Add(“&Display.Help”); c) ContextMenu1.MenuItems[0].Click += new System.EventHandler(helpTKOption_Click) d) ContextMenu1.Popup += new System.EventHanler(helpTKOption_Click) You develop a Windows- based application that will retrieve CertKing employee vacation data and display it in a DataGrid control The data is managed locally in a DataSet object named employeeDataSet You need to write code that will enable users to sort the data by department Which code segment should you use? a) DataView dvDept = new DataView(); dvDept.Table = employeeDataSet.Tables[0]; dvDept.Sort = “ASC”; DataGrid1.DataSource = dvDept; b) DataView dvDept = new DataView(); dvDept.Table = employeeDataSet.Tables[0]; dvDept.Sort = “Department”; DataGrid1.DataSource = dvDept; c) DataView dvDept = new DataView(); dvDept.Table = employeeDataSet.Tables[0]; dvDept.ApplyDefaultSort = true; DataGrid1.DataSource = dvDept; d) DataView dvDept = new DataView(); dvDept.Table = employeeDataSet.Tables[0]; dvDept.ApplyDefaultSort = false; DataGrid1.DataSource = dvDept; You use Visual Studio.Net to develop a Windows- based application Your application will display customer order information form a Microsoft SQL Server database The orders will be displayed on a Windows Form in a data grid named DataGrid1 DataGrid1 is bound to a DataView object The Windows Form includes a button control named displayBackOrder When users click this button, DataGrid1 must display only customer orders whose BackOrder value is set to True How should you implement this functionality? a) Set the RowFilter property of the DataView object to “BackOrder = true” b) Set the RowStateFilter property of the DataView object to “BackOrder = True” c) Set the Sort property of the DataView object to “BackOrder = true” FPT-Aptech confidential Page 12 d) 55 Set the ApplyDefaultSort property of the DateView object to true You develop a Windows- based application to manage business contacts The application retrieves a list of contacts from a central database The list of contacts is managed locally in a DataSet object named contactDataSet To set the criteria for retrieval, your user interface must enable users to type a city name into a TextBox control The list of contacts that match this name must then be displayed in a DataGrid control Which code segment should you use? a) DataView contactDataSet = new DataView(); dv.Table = contactDataSet.Tables[0]; dv.RowFilter = TextBox1.Text; DataGrid1.DataSource = dv; b) DataView dv = new DataView(); dv.Table = contactDataSet.Tables[0]; dv.RowFilter = String.Format(“City=’{0}’”, TextBox1.Text); DataGrid1.DataSource = dv; c) DataView contactDataSet = new DataView(); dv.Table = contactDataSet.Tables[0]; dv.Sort = TextBox1.Text; DataGrid1.DataSource = dv; d) DataView dv = new DataView(); dv.Table = contactDataSet.Tables[0]; dv.Sort = String.Format(“City=’{0}’”, TextBox1.Text); DataGrid1.DataSource = dv; Which of the following statements with respect to ADO.Net are True? (Choose 3) 56 a) In ADO, the RecordSet is bound to the data source b) When we use the DataSet object, ADO.Net is based on disconnected data access c) ADO.Net objects are all strongly typed d) Systems built on ADO.NET are intrinsically highly scaleable Which of the following statements with respect to Data Grid control are True? (choose 3) 57 a) When the DataGrid control is set to a valid data source, the control is populated automatically b) Each field in the DataGrid is bound to a single column based on the DataSource c) By default, the DataGrid displays page at a time d) The DataGrid control displays data in a tabular format and optionally supports data editing Which Control is used to display the current status of the application using framed windows? 58 a) StatusBar b) ToolBar c) TreeView d) ListView Which event occurs when the form is closed? 59 a) Closes b) Delete c) Close d) Closed FPT-Aptech confidential Page 13 Which namespace in VS.Net contains classes that help in constructing and sending emails? 60 a) System.Web.MailMessage b) System.Web.MailMessages c) System.Web.Mail d) System.Mail Which control is used to link an HTML file with the Winforms application? 61 a) HelpString b) HelpProvider c) HelpText d) HelpButton FPT-Aptech confidential Page 14 [...]... the user control to CertKing Form Repeat this process for the other forms d) Create a new ActiveX control that includes a TextBox control and a Label control For each column in the CertKing table, add one instance of the ActiveX control to CertKing Form Repeat this process for the other forms You use Visual Studio.Net to develop a Windows- based application that contains a single form This form contains... = false; DataGrid1.DataSource = dvDept; You use Visual Studio.Net to develop a Windows- based application Your application will display customer order information form a Microsoft SQL Server database The orders will be displayed on a Windows Form in a data grid named DataGrid1 DataGrid1 is bound to a DataView object The Windows Form includes a button control named displayBackOrder When users click... same access key, and the user must press ENTER to select the items If this access key is used, the first item in the menu that has the access key assigned to it will be selected d) 49 50 You create a Windows Forms named CertKing Form This form enables users to maintain database records in a table named CertKing You need to add several pairs of controls to CertKing Form You must fulfill the following requirements:... for the other forms b) Add a TextBox control and a Label control to CertKing Form Write the appropriate code in the LostFocus event of the TextBox control Create a control array form the TextBox control and the Label control At runtime, add additional pairs of controls to the control array until every column in the CertKing table has a pair of controls Repeat this process for the other forms c) Create... to exactly one number more than labelValue.TabIndex FPT-Aptech confidential Page 11 51 You develop an application that enables users to enter and edit purchase order details The application includes a Windows Form named Display CertKing Form The application uses a clientside DataSet object to manage date The DatatSet object contains a Data Table object named CertKing Details This object includes one... ContextMenu1.MenuItems.Add(“&Display.Help”); c) ContextMenu1.MenuItems[0].Click += new System.EventHandler(helpTKOption_Click) d) ContextMenu1.Popup += new System.EventHanler(helpTKOption_Click) You develop a Windows- based application that will retrieve CertKing employee vacation data and display it in a DataGrid control The data is managed locally in a DataSet object named employeeDataSet You need to write... one column in the CertKing table • Each pair must consist of a TextBox control and a Label control • The LostFocus event of each TextBox control must call a procedure named UpdateDatabase • Additional forms similar to CertKing Form must be created for other tables in the database • Application performance must be optimized • The amount of necessary code must be minimized What should you do? a) Create... “BackOrder = True” c) Set the Sort property of the DataView object to “BackOrder = true” FPT-Aptech confidential Page 12 d) 55 Set the ApplyDefaultSort property of the DateView object to true You develop a Windows- based application to manage business contacts The application retrieves a list of contacts from a central database The list of contacts is managed locally in a DataSet object named contactDataSet... displays 1 page at a time d) The DataGrid control displays data in a tabular format and optionally supports data editing Which Control is used to display the current status of the application using framed windows? 58 a) StatusBar b) ToolBar c) TreeView d) ListView Which event occurs when the form is closed? 59 a) Closes b) Delete c) Close d) Closed FPT-Aptech confidential Page 13 Which namespace in VS.Net... contains classes that help in constructing and sending emails? 60 a) System.Web.MailMessage b) System.Web.MailMessages c) System.Web.Mail d) System.Mail Which control is used to link an HTML file with the Winforms application? 61 a) HelpString b) HelpProvider c) HelpText d) HelpButton FPT-Aptech confidential Page 14 ... namespace does the class ListView belong to? 40 a) System .Windows. Drawing b) System .Windows. Forms c) System .Windows. Paints d) System .Windows. Lists Which of the following statements are True with... public void ButtonHandler(System .Windows. Forms. Button sender) c) public void ButtonHandler(System.Object sender) d) public void ButtonHandler(System .Windows. Forms. Button sender, System.EventArgs... Connection object Which class is the base class for all the controls that can be used in Windows Forms? 21 a) Objects b) Forms c) Controls d) Control Which of the following statements about event handlers

Ngày đăng: 04/12/2015, 15:42

TỪ KHÓA LIÊN QUAN

w