PrepAway - Latest Free Exam Questions & Answers

Category: 70-526

Exam 70-526: TS: Microsoft .NET Framework 2.0 – Windows-Based Client Development.

What should you do to make sure that the event handler gets called?

You are busy using a BackgroundWorker component to execute an asynchronous operation. The job of the background thread is to call the ReportProgress method to update the foreground thread. You have handled the ProgressChanged event and set the Value property of a ProgressBar. The problem is that the ProgressBar display by no means gets updated. During the investigation you find out t6hatvthe event handler that works with the ProgressChanged event never gets called. What should you do to make sure that the event handler gets called?

Which code segment should you use?

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 Do WorkEventHandler(WorkHandler); bgwExecute.DoWorkerCompleted +=
new Do WorkerCompletedEventHandler(CompletedHandler); bgwExecute.ProgressChanged += new
ProgressChangedEventHandler(ProgressHandler);
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?

Which code segment should you use?

You are customizing a Windows Form to use a BackgroundWorker component named bgwExecute. bgwExecute perform a database operation by an event handler named WorkHandler. You need to ensure that users can see the progress of the database operation by viewing a progress bar named pbProgress. You want the progress bar to appear when the database operation is 50 percent complete. Which code segment should you use?

Which two actions should you perform?

You are creating a Windows Forms application. You create a class named ApplicationUtilities
and add a method named BackgroundProcess. You anticipate that the BackgroundProcess
method may require several minutes or longer to execute. You need to ensure that the application remains responsive while the BackgroundProcess method runs. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)


Page 7 of 15« First...56789...Last »