English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I've been working on a project where I need to develop a software using Visual Basic 6. Now, my problem is, does VB 6 have any operator that'll allow me to chek for the presence of a character string within a character array?

For example:

I want to know if "scien" is present in the array "rocket scientist". How can I make this possible?

2007-06-03 22:02:39 · 6 answers · asked by Shayonâ?¢ 2 in Computers & Internet Programming & Design

@ AnalProgrammer

The source that u'd used in for Visual Basic.NET and the software I am using is Visual Basic 6. Moreover, "IndexOf" is a user-created function in the example given in ur source page. I wanted to know if there is any inherent operator or function to check that, in Visual Basic 6.


@ Waheed

SubStr is used in C n C++, sweetheart....not in VB6. Anyways, thanks for trying to help me out!!

2007-06-03 22:22:40 · update #1

@ Mohamed Kaleel

Hey, thanks a lot for the help, ya....got my problem fixed, kinda. Btw...wot xactly does the function InStr do? Well..another Question...which add-in is the best for generating reports in VB6? Crystal Reports or the in-built report generator in VB6 or something else? I would like to use the one which'll be most versatile.

2007-06-03 22:47:01 · update #2

6 answers

Using instr u can achive this,

instr (Start,string1,string2,VBcomparemethod )

Eg,

Dim str1 as string
Dim str2 as string

str1="Kaleel"
str2="leel"

Msgbox instr(1,str1,str)


ouput will be 3, if it present it will return >=1 else 0

2007-06-03 22:21:52 · answer #1 · answered by Mohamed Kaleel 2 · 2 0

Log-in ID I am assuming you are meaning, it is not exactly clear what you are asking. But if it is on the load event for your application have it trigger and load a dialog to prompt the user for their log-in and password, this will return those values to your main application for verification. You will have to code these yourself. Including the look up in whatever database of password reference system you define yourself.

2016-04-01 01:11:17 · answer #2 · answered by Anonymous · 0 0

Dim instance As String
Dim value As String
Dim returnValue As Integer

returnValue = instance.IndexOf(value)

2007-06-03 22:13:05 · answer #3 · answered by AnalProgrammer 7 · 0 1

If u have no idea abt VB...then why use this tool?

2007-06-04 17:18:40 · answer #4 · answered by Rockers 1 · 1 0

well me not sure about it, but i guess, u can find it with SUBSTR function.

2007-06-03 22:11:46 · answer #5 · answered by waheed_hashim 2 · 0 1

you can use instr()...

2007-06-03 22:23:29 · answer #6 · answered by Mohammed 1 · 1 1

fedest.com, questions and answers