Mar 2016 updated: Exambible Microsoft 70-526 exams 16-30

70-526 Royal Pack Testengine pdf

100% Actual & Verified — 100% PASS

Unlimited access to the world's largest Dumps library! Try it Free Today!

Get it now →

Product Description:
Exam Number/Code: 70-526
Exam name: Microsoft .NET Framework 2.0 - Windows-based Client Development is in development
n questions with full explanations
Certification: Microsoft Certification
Last updated on Global synchronizing

Free Certification Real IT 70-526 Exam pdf Collection

Exam Code: 70-526 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: Microsoft .NET Framework 2.0 - Windows-based Client Development is in development
Certification Provider: Microsoft
Free Today! Guaranteed Training- Pass 70-526 Exam.

2016 Mar 70-526 Study Guide Questions:

Q16. You are creating a complex data-entry Windows Forms application. The application allows users to move text between text boxes by using drag-and-drop operations. Your company also has other data-entry applications. You need to ensure that users can perform similar drag-and-drop operations between the different applications. What should you do?

A. Ensure that the AllowedEffect property in each application includes the DragDropEffects.Link setting.

B. Ensure that the Effect property in each application includes the DragDropEffects.Link setting.

C. Ensure that the Effect property in the drag source application includes the DragDropEffect.Link setting, and the AllowedEffect property in the drop target application is set to DragDropEffect.Copy.

D. Ensure that the Effect and AllowedEffect properties in each application include the DragDropEffect.Copy setting.

Answer: D


Q17. You create a Windows user control named EmployeeData. You want to provide design-time layout support for EmployeeData so that it will easily align with other controls on the form. You create a class named SnapLineDesigner that inherits from the System.Windows.Forms.Design.ControlDesigner class. You add a Designer attribute to the EmployeeData class and pass in SnapLineDesigner as the designerTypeName parameter.  You need to provide the design-time layout support for EmployeeData. What should you do?

A. In the constructor of EmployeeData, add items to the SnapLines collection of EmployeeData.

B. In the constructor of EmployeeData, add items to the SnapLines collection of SnapLineDesigner.

C. In the constructor of SnapLineDesigner, add items to the SnapLines collection of EmployeeData.

D. In the constructor of SnapLineDesigner, add items to the SnapLines collection of SnapLineDesigner.

Answer: D


Q18. You are customizing a Windows Form. You want to display a custom icon for your composite control named DialerControl in the toolbox. You need to customize the toolbox icon. You want to achieve this goal by using the minimum amount of effort.  Which action or actions should you perform? (Choose all that apply.)

A. Add a bitmap named DialerControl.bmp to the user control project.

B. Change the build action of the bitmap to Embedded Resource.

C. Add a ToolboxBitmap attribute to the DialerControl class, passing in DialerControl.bmp as a parameter.

D. Add a ToolboxBitmap attribute to the DialerControl class, passing in typeof(DialerControl) as a parameter.

Answer: AB


Q19. You are customizing a Windows Form to update a database asynchronously by using an instance of a BackgroundWorker component named bgwExecute. You start the component by using the following code.

private void StartBackgroundProcess() {

   bgwExecute.DoWork += new DoWorkEventHandler(WorkHandler);

   bgwExecute.RunWorkerCompleted += new RunWorkerCompletedEventHandler(CompletedHandler);

   bgwExecute.ProgressChanged += new ProgressChangedEventHandler(ProgressChanged);

   bgwExecute.RunWorkerAsync(); 

}

If the UpdateDB method that is called by the BackgroundWorker component returns the value False, you need to display a message box to the user that indicates that the update failed. Which code segment should you use?

A. void WorkHandler(object sender, DoWorkEventArgs e) {

   if (!UpdateDB()) MessageBox.Show("Update failed");

}

B. void CompletedHandler(object sender, RunWorkerCompletedEventArgs e) {

   if (! UpdateDB()) MessageBox.Show("Update failed");

}

C. void WorkHandler(object sender, DoWorkEventArgs e) {

   e.Result = UpdateDB();

}

void CompletedHandler(object sender, RunWorkerCompletedEventArgs e) {

   if (!(bool) e.Result) MessageBox.Show("Update failed");

}

D. void WorkHandler(object sender, DoWorkEventArgs e) {

   e.Result = UpdateDB();

}

void CompletedHandler(object sender, RunWorkerCompletedEventArgs e) {

   if (!(bool) e.Result) bgwExecute.ReportProgress(0);

}

void ProgressChanged(object sender, ProgressChangedEventArgs e) {

   if (e.ProgressPercentage==0) MessageBox.Show("Update failed");

}

Answer: C


Q20. You created a custom action for your Windows setup application. The custom action runs a standard Console application at the end of the installation process. You place the custom action in the Install node of the Custom Actions tree in the Custom Actions Editor. The Console application executable performs correctly when run as a stand-alone application. However, when you run the Microsoft Windows Installer package that was created by your setup application, the custom action does not run. Everything else works fine. You need to ensure that the console application runs during the install. What should you do?

A. Set the InstallerClass property of your custom action to False.

B. Place the custom action in the Commit node of the Custom Actions tree rather than in the Install node.

C. Set the DetectNewerInstalledVersion property for your setup application to True.

D. Set the InstallAllUsers property for your setup application to True.

Answer: A


70-526 exam prep

Up to date 70-526 free practice test:

Q21. You are creating an installation package for a .NET Framework application. You need to configure your installation package to add a shortcut to the user's desktop during installation. Which editor in the setup project should you use?

A. File Types Editor

B. User Interface Editor

C. Custom Actions Editor

D. File System Editor

Answer: D


Q22. You are customizing a Windows Form. When the user clicks any button, you want the application to log information about the users actions by calling a method with the following signature.

public void ctl_Click(object sender, EventArgs e)

You want the form to invoke this method when any Button control is clicked and only when a Button control is clicked.  You need to modify the form to invoke this method without interfering with the existing operations of the application. What should you do?

A. Add the following code to the form initialization.

foreach (Control ctl in this.Controls) {

if (ctl is Button) {

ctl.Click += new EventHandler(ctl_Click);

}

}

B. Add the following code to the form initialization.

this.Click += new EventHandler(ctl_Click);

C. Use the Properties dialog box to set the Click event for each Button control on the form to the ctl_Click method.

D. Use the Properties dialog box to set the Click event of the form to the ctl_Click method.

Answer: A


Q23. You are customizing a Windows Form to asynchronously update a database. You need to ensure that the form displays a message box to the user that indicates the success or failure of the update. Which three code segments should you use? (Each correct answer presents part of the solution. Choose three.)

A. private void StartBackgroundProcess() {

   bgwExecute.DoWork += new DoWorkEventHandler(WorkHandler);

   bgwExecute.RunWorkerCompleted += new RunWorkerCompletedEventHandler(CompletedHandler);

   bgwExecute.RunWorkerAsync();

}

B. private void StartBackgroundProcess() {

   bgwExecute.ProgressChanged += new ProgressChangedEventHandler(CompletedHandler);

   ThreadStart tsBackground = new ThreadStart(WorkHandler);

   bgwExecute.RunWorkerAsync(tsBackground);

}

C. private void StartBackgroundProcess() {

   bgwExecute.RunWorkerCompleted += new RunWorkerCompletedEventHandler(CompletedHandler);

   ThreadStart tsBackground = new ThreadStart(WorkHandler);

   bgwExecute.RunWorkerAsync(tsBackground);

}

D. D. void WorkHandler(object sender, DoWorkEventArgs e) {

   //...

   e.Result = true; 

}

E. void WorkHandler(object sender, DoWorkEventArgs e) {

   //...

   bgwExecute.ReportProgress(100, true);

}

F. void CompletedHandler(object sender, RunWorkerCompletedEventArgs e) {

   bool result = (bool)e.Result;

   MessageBox.Show("Update " + (result ? "was successful" : "failed"));

}

G. void ProgressHandler(object sender, ProgressChangedEventArgs e) {

   bool result = (bool)e.UserState;

   MessageBox.Show("Update " + (result ? "was successful" : "failed"));

}

Answer: ADF


Q24. You are creating a Windows Forms setup application. The default user interface does not meet your needs. You want to provide an additional dialog box that includes two check boxes during the install process. You want the check boxes to give users the option to install two large Help files named Help1 and Help2 during the installation process.  You need to customize the interface to meet your needs.  Which three actions should you perform? (Each correct answer presents part of the solution. Choose three.)

A. Create the dialog box and the logic for the dialog box in a separate project. Compile the project into an executable, and add the executable to the setup project.

B. In the User Interface Editor, add a Checkboxes dialog box to the Start node of the user interface tree.

C. Use the Custom Actions Editor to add the dialog box executable for the setup application to the Install node.

D. In the Properties window for your setup project, set the PreBuildEvent property to call a command line to display the dialog box.

E. In the File System Editor, set the Condition property for Help1 to the value of the Checkbox1Property property.Set the Condition property for Help2 to the value of the Checkbox2Property property.

F. Set the Checkbox3Visible and Checkbox4Visible properties of the Checkboxes dialog box to False.

Answer: BEF


Q25. You are creating a Windows Forms application that includes the database helper methods UpdateOrder and UpdateAccount. Each method wraps code that connects to a Microsoft SQL Server 2005 database, executes a Transact-SQL statement, and then disconnects from the database. You must ensure that changes to the database that result from the UpdateAccount method are committed only if the UpdateOrder method succeeds. You need to execute the UpdateAccount method and the UpdateOrder method. Which code segment should you use?

A. using (TransactionScope ts = new TransactionScope()) {

UpdateOrder();

UpdateAccount();

ts.Complete();

}

B. using (TransactionScope ts1 = new TransactionScope()) {

UpdateOrder();

using (TransactionScope ts2 = new TransactionScope(TransactionScopeOption.RequiresNew)) {

UpdateAccount();

ts2.Complete();

}

ts1.Complete();

}

C. using (TransactionScope ts = new TransactionScope(TransactionScopeOption.RequiresNew)) {

UpdateOrder();

ts.Complete();

}

using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required)) {

UpdateAccount();

ts.Complete();

}

D. using (TransactionScope ts = new TransactionScope(TransactionScopeOption.RequiresNew)) {

UpdateOrder();

}

using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required)) {

UpdateAccount();

ts.Complete();

}

Answer: A


70-526 free practice questions

Pinpoint 70-526 actual exam:

Q26. You are creating a Windows Forms application. The application uses a SqlCommand object named cmd. The cmd object executes the following stored procedure.

CREATE PROCEDURE GetPhoneList

AS BEGIN

SELECT CompanyName, Phone FROM Customers

SELECT CompanyName, Phone FROM Suppliers

END

You need to add all returned rows to the ListBox control named lstPhones. Which code segment should you use?

A. SqlDataReader rdr = cmd.ExecuteReader();

do {

   while (rdr.Read()) {

     lstPhones.Items.Add(rdr.GetString(0) + "\t"       + rdr.GetString(1));

   }

} while (rdr.NextResult());

B. SqlDataReader rdr = cmd.ExecuteReader();

while (rdr.Read()) {

lstPhones.Items.Add(rdr.GetString(0) + "\t"     + rdr.GetString(1));

}

C. SqlDataReader rdr = cmd.ExecuteReader();

while (rdr.NextResult()) {

   while (rdr.Read()) {

     lstPhones.Items.Add(rdr.GetString(0) + "\t"       + rdr.GetString(1));

   }

}

D. SqlDataReader rdr = cmd.ExecuteReader();

while (rdr.NextResult()) {

   lstPhones.Items.Add(rdr.GetString(0) + "\t"     + rdr.GetString(1));

}

Answer: A


Q27. You are creating a Windows user control named UrlRequest. UrlRequest contains a ComboBox control named cboUrl and a Button control named btnGo.  When the user clicks btnGo, you want the UrlRequest control to provide notification that the value of cboUrl changed. You need to implement the notification functionality. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A. Create a public event named UrlRequested and a property named Url for your control that returns the Url value of cboUrl.

B. Change the Modifiers property of btnGo to Public.

C. Add a DefaultEvent attribute to UrlRequest that uses the btnGo_Click event as an argument.

D. Change the Modifiers property of cboUrl to Public.

E. Raise the UrlRequested event in the Click event handler for btnGo.

Answer: AE


Q28. Your law firm uses a custom application to create and print legal documents. Currently, users can print any portion of a document that they want from the application by using the options in the Print dialog box. This Print dialog box was implemented by using the PrintDialog component. New security and auditing rules state that the application must implement a business rule that requires users to print documents in their entirety. Printing only portions of a document is prohibited. You need to modify the PrintDialog component named printDlg to enforce the business rule when a user prints. You must implement this rule with the minimum amount of impact to users. What should you do?

A. Set the PrintDialog component to 

printDlg.PrinterSettings.PrintRange = PrintRange.AllPages;

B. Call the printDlg.Reset method when the Print dialog box is closed.

C. Configure the following settings for the PrintDialog component.

printDlg.AllowSomePages = false;

printDlg.AllowSelection = false;

printDlg.AllowCurrentPage = false;

D. Create a warning message that displays if the user selects the Pages option in the Print dialog box to try to print a subset of a document. Use the following settings to set the full document to print.

printDlg.PrinterSettings.FromPage = printDlg.PrinterSettings.MinimumPage; 

printDlg.PrinterSettings.ToPage = printDlg.PrinterSettings.MaximumPage;

Answer: C


Q29. You are creating a Windows Forms application that targets Microsoft Windows 2000 or later. You need to configure your Setup application for conditional installation. Which part or parts of a Setup application can be configured for conditional installation based on the operating system? (Choose all that apply.)

A. primary output of a project

B. registry keys and values

C. file type associations

D. user interface dialog boxes

E. custom actions

Answer: BC


Q30. You want to execute an event handler asynchronously from a Windows Form. You need to execute a method named WorkHandler by using an instance of the BackgroundWorker component named bgwExecute. Which two code segments should you use? (Each correct answer presents part of the solution. Choose two.)

A. EventHandler work = new EventHandler(WorkHandler);

B. ThreadStart work = new ThreadStart(WorkHandler);

C. bgwExecute.DoWork += new DoWorkEventHandler(WorkHandler);

D. bgwExecute.RunWorkerAsync();

E. bgwExecute.RunWorkerAsync(work);

Answer: CD