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
Anybody plz give, How do you test aframe in a web page? If page cotain text message or Images, tables?
In qtp, how you can exit for loop?
how can i pass a "automation script" as a parameter in a function give me need full suggestion thank inadvance
How do you do batch testing in wr and is it possible to do in qtp, if so explain?
what function you write to do database testing with the help of qtp?
What is a recovery scenario?
How may types of defects identify application or your currently working application?pls give me answer..
How many scripts did you have?
How to use debug tools?
I AM TRYING PORT CODE FROM WINRUNNER TO QTP AND DON'T KNOW TO HOW TO CHECK THE ERRORS. IN WINRUNNER FUNCTION RETURNS EIGHER 0 OR -1 AGAINST WHICH RESULT CAN BE MADE PASS OR FAIL BUT IN QTP I DON'T SEE FUNCTIONS RETURNING ANY VALUE. APPRECIATE IF ANYONE COULD HELP ME CONVERTING FOLLWOING WINRUNNER CODE TO QTP. set_window("Customer Service"); rc = web_obj_get_text("Summary","#2","#4",ssn,""," ",1); if (rc != E_OK) { report_msg("[GetSubscriberSummary] Could Not get subscriber SSN; rc = "&rc); myRC = rc; } else { ssn = StripBlank(ssn); if (DEBUG) report_msg ("[GetSubscriberSummary] SSN: "&ssn); }
What is the default object synchronization timeout in qtp?
can any body clearly explain about keyword driven framework .give me the explanation for files what ever you use in this frame work?
You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?
How to check which add-ins are associated with a test in qtp?
HI I want to know the detials of QTP certifications such as syllabus, study Materil etc. Can any provide me all these details?? my mail ID is krishnuvk@yahoo.com