MCSD.NET - 70-306 Exam Question:
Download Questions PDF

Suppose You develop a Windows-based application that includes the following code segment. (Line
numbers are included for reference only.)
01 Public Sub password_Validating (ByVal sender As _
02 Object, ByVal e As _.
03 System.ComponentModel.CancelEventArgs)
04 Handles password.Validating
05 If ValidPassword() = False Then
06 Insert new code.
07 End If
08 End Sub
You must ensure that users cannot move control focus away from textPassword if
ValidPassword returns a value of False. You will add the required code on line 6.
Which code segment should you use?
A. e.Cancel = True
B. sender = textName
C. password.AcceptsTab = False
D. password.CausesValidation =False

Answer:

A. e.Cancel = True

Download MCSD.NET - 70-306 Exam Interview Questions And Answers PDF

Previous QuestionNext Question
Suppose You use Visual Studio .NET to create a Windows-based application for XYZ Inc. The application
includes a form that contains 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.
Later, you discover that exitButton is too small. You need to enlarge its vertical dimension with
the least possible effort, and without disrupting the other controls.
First you select exitButton in the Windows Forms Designer. What should you do 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 the mouse to resize the control.
Set the Locked property to True.
C. Set the Size property to the required size.
D. Use the mouse to resize the control.
Suppose You develop a Windows Form that provides online help for users. You want the help functionality
to be available when users press the F1 key. Help text will be displayed in a pop-up window for
the text box that has focus.
To implement this functionality, you need to call a method of the HelpProvider control and pass
the text box and the help text.
Which method should you call?
A. SetShowHelp
B. SetHelpString
C. SetHelpKeyword
D. ToString