GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Microsoft  >  VB.NET

 Print  |  
Question:  Windows-based application code segment

Answer: 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


April 04, 2009 13:52:47 #1
 sed0424   Member Since: April 2009    Total Comments: 1 

RE: Windows-based application code segment
 
If e is defined as System.ComponentModel.CancelEventArgs, e As System.ComponentModel.CancelEventArgs, then e.cancel is correct
     

 

Back To Question