This preview shows page 110 - 113 out of 159 pages.
Answer:AQuestion: 156 (A) You work as a software developer at Company.net. You develop a Windows-based application that includes a form named CompanyForm. This form includes a ComboBox control named CompanyComboBox. When CompanyForm is loaded, the following code is executed: CompanyComboBox.DropDownStyle = _ ComboBoxStyle.DropDownList
Exam Name: Developing Windows-based Applications with Microsoft Visual Basic .NET Exam Type: Microsoft Exam Code: 70-306 Doc Type: Q&A with Explanations Total Questions: 255 Page 111 of 159 CompanyComboBox.DataSource = _ oDS.Tables(“Companys”).DefaultView CompanyComboBox.DisplayMember = “ContactName” CompanyComboBox.ValueMember = “CompanyID” When the user makes a selection from CompanyComboBox, the appropriate CompanyID must be retrieved. You want to write the shortest possible code segment to achieve this goal. Which property of CompanyComboBox should your application retrieve? A. SelectedItem B. SelectedValue C. Text D. ValueMember Answer:BQuestion: 157. (B) You create an assembly by using Visual Studio .NET for your client, military agency. The assembly is responsible for writing and reading confidential data of military movement to and from an XML data file onto an encrypted hard drive. You need to implement security in the assembly. What should you do? A. Implement declarative security and execute the permission demand to allow access to the file system. B. Implement imperative security and execute the permission demand to allow access to the file system. C. Implement imperative security and execute the minimum permission request to allow access to the file system. D. Implement declarative security and execute the minimum permission request to allow access to the file system. Answer:D Explanation: You can use declarative code access security to request permissions for the entire assembly. SecurityAction flags that can be specified in an assembly-wide directive. When SecurityAction.RequestMinimum is specified, it makes a request to the common language runtime to be granted the requested permission. If the requested permission is not granted by the security policy, the assembly will not execute. Question: 158. (A) You are creating an application for a large hotel chain firm, Awana Hotels. The application will show list a of vacant rooms in a ListBox control on a form. By double-clicking any of the rooms in the list box, a new form will appear that displays a graphical representation of each room. You find that the desktop becomes cluttered easily. You do not want the users of the application to resize the blueprint forms larger than 300 pixels by 300pixels. Which of the following code fragments should you use to restrict the size of the blueprint forms? (Select the best choice.) A. BPForm.MinimumWidth = 300: BPForm.MinimumHeight = 300 B. BPForm.MaximumSize = New Size(300, 300) C. BPForm.MaximizedBounds = New Rectangle(0, 0, 300, 300) D. BPForm.MinimumSize = New Size(300, 300) Answer:B
Exam Name: Developing Windows-based Applications with Microsoft Visual Basic .NET Exam Type: Microsoft Exam Code: 70-306 Doc Type: Q&A with Explanations