Answer Posted / mr. buntha khin
Sample code to use InStr() in VB.Net
Friend Function DecimolNumbers(ByVal KeyChar As Char, ByVal
TxtBox As TextBox) As Boolean
Select Case KeyChar.ToString
Case Keys.Delete.ToString
Return False
Exit Function
Case Keys.Left.ToString
Return False
Exit Function
Case Keys.Right.ToString
Return False
Exit Function
Case Keys.Tab.ToString
Return False
Exit Function
Case vbBack
Return False
Exit Function
Case Keys.Enter.ToString
Return False
Exit Function
Case Keys.Home.ToString
Return False
Exit Function
Case Keys.End.ToString
Return False
Exit Function
Case Keys.Escape.ToString
End Select
If (KeyChar.ToString = "." And InStr
(TxtBox.Text, ".") > 0) Then
Return True
Exit Function
End If
If KeyChar.ToString = "." Then Return False
If IsNumeric(KeyChar) = True Then
Return False
Else
Return True
End If
End Function
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Hi all can any one give me roles and responsibilities for QTP (not WINRUNNER)
Explain the concept of how quicktest professional (qtp) identifies object?
Functions call by reference and call by value. i want the diff b/n these 2 and how will be the script for this?in which situation we use these 2..?pls explain me clearly
HOW AUTOMATE TEST SCRIPT ? what time it will do? after gneration of basic script or Any , Plz explain detailed?
Hi, I am using OutputCheckPoint for 2 webelements Bed:4 and Bath:2 Full,1 partial in my result page and I am storing the value in the data table. I dont need the string Bed:4,I would like to get only the no 4. How can I get it? Even though I highlight only 4,It is seleting the full value "bed 4". Same thing happend for second webelement Bath:2 Full,1 partial I need only the No 2. I used the following to split MyArray = Split(UIBathResult, " ", -1, 1) But it is giving the value My Array(0)=Bath:2full,1Partial I need the only the nos for further comparision.Any help? Thanks Uma
What is checkpoints for quicktest professional?
can i change the runtime properties of an object ? How can i check if a parameter exists in database ?
How does qtp identify the object in the application?
What is the extension of the qtp local repository? If it is .mtr then what is .bdb extension stands for?
Explain the concept of how quicktest professional identifies object?
What is file database?
Explain about Test Fusion Report of QTP?
Please provide specific examples of advanced/creative usage of QTP, including how impact & benefits for your project
What is keyword view?
How many add-ins comes by default with qtp?