Question about Microsoft Visual Basic 6.0 for PC

1 Answer

How to search strings in visual basic 6.0

Helo, i'm making a PROGRAM using visual basic 6.0 for our class. can u help me? how can i search for string?

Posted by on

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that got 5 achievements.

    Mentor:

    An expert who has written 3 tips or uploaded 2 video tips.

    Governor:

    An expert whose answer got voted for 20 times.

  • Expert
  • 80 Answers

Example:
Dim SearchWithinThis As String = "ABCDEFGHIJKLMNOP" Dim SearchForThis As String = "DEF" Dim FirstCharacter As Integer = SearchWithinThis.IndexOf(SearchForThis)

Posted on Mar 11, 2009

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

How to write a program to translate english text to binary string and write a program to do inverse 27 = . , 28 = , 29= ? 30 = . 31=


to convert from text to binary, you would do something along the following lines..
1. have the user enter a string.
2. loop through the string (for each char in stringEntered..)
3. convert the character to binary using the methods provided to you by your language of choice

For the reverse (binary to text):
you must take 8 bits of data (which would be a single character), and convert it to text using the methods provided by your language of choice..

here's some links that might be of interest to you.
Visual FoxPro VFP CTOBIN and BINTOC Functions Equivalent In Net The Most Accurate and Reliable Source Code Converters

Feb 06, 2015 | Microsoft Visual Studio 6 6.0 Professional...

2 Answers

What is strings in java?


Handling character strings in Java is supported through two final
classes: Java String and StringBuffer. The String class implements immutable character strings, which are read-only once the string has been created and initialized, whereas the StringBuffer class implements dynamic character strings. All string literals in Java programs, are implemented as instances of String class. Strings in Java are 16-bit Unicode.

Nov 21, 2012 | Sun Java Programming Language (cdj-275)

1 Answer

Create a program that asks for a sentence. Your program will then check if the sentence is a palindrome or not.


Palindrome using C#.net

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string str=string .Empty ;

Console.WriteLine("Enter a String");

string s = Console.ReadLine();

int i = s.Length;
//we can get the Length of string by using Length Property

for (int j=i -1; j >= 0; j--)
{
str = str + s[j ];
}
if (str == s)
{


Console.WriteLine(s + " is palindrome");


}
else
{
Console.WriteLine(s + " is not a palindeome");
}

Console.WriteLine(str);

Console.Read();


}

Nov 30, 2010 | Compilers & Programming Tools

1 Answer

HELP i need the solution for this Java program and the hole code and the program as soon as possible :implement a simple GA with fitness-proportionate selection, roulettewheel sampling, population size...


If you are asking for help developing the code for this problem, you should search VB forums. This is a coding issue and not a software issue

Debbie Mahler
MICE Training, Technology & Education
mice.org

Sep 18, 2009 | Microsoft Visual Basic Enterprise Edition...

1 Answer

Example sorurce code for database


Hello my friend try this code: This code is design for Visual Basic 6.0
Function for Connection and recordset string.  '========Connection String====== Public Sub connection(ByRef dConnection As ADODB.connection, ByVal dLocation As String)     dConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dLocation & ";Persist Security Info=False;" End Sub '======End of Connection String======
'=======Recordset String=========== Public Sub recordset(ByRef sRecordset As ADODB.recordset, ByRef sConnection As ADODB.connection, ByVal sSQl As String) With sRecordset .CursorLocation = adUseClient .Open sSQl, sConnection, adOpenKeyset, adLockOptimistic End With End Sub '======End Recordset String========
How to apply the above function? Application:
'====== Command Save Button======== Private Sub cmdsave_Click() Dim cn3 As New ADODB.connection Dim rs3 As New ADODB.recordset
Call connection(cn3, App.Path & "\CASGC.mdb") Call recordset(rs3, cn3, "Select * from Debtor_Creditor_Account") Set dtglobal.DataSource = rs3.DataSource   
With rs3   .AddNew   .Fields("Code") = txtCode.Text   .Fields("Description") = txtDescription.Text   .Fields("Tag") = cbotag.Text   .Update   .Requery    End With   MsgBox "New Account has been Added", vbInformation   Set cn3 = Nothing Set rs3 = Nothing
End Sub '=======end of Command Save button=====
The advantage of using this code is setting your database connection is you have a reliable connection towards your database where ever you place your database you can you don't to remount you databse connection control. Also you are no longer need to use a ADO control or DAO control just copy the function and paste it in your coding area and call the function and you have now a working database and recordset connection string. 

For more details regarding how to apply this code just email me at this address: geo_jonas@yahoo.com to get more codes. thanks.. Please rate this Solution.

Jul 08, 2009 | Microsoft Visual Basic 6.0 for PC

1 Answer

Retrieving acess data which is password protected thru VB


You will need to use a connection string. But - before you can configure the string correctly, I'd need to know how the data is stored (Access, SQL, ODBC, etc). You can find examples online. Just know that you are looking for "Connection String." Here's two examples:
1. For MS Access (Jet files):
' Set up the connection string.
m_strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strDestDBPath & ";" & _
"Jet OLEDB:Engine Type=5" ' NOTE: Use Type=5 for Jet 4.x.

2. For SQL database:
g_strADOConn = "Provider=SQLOLEDB;" & _
"Data Source=SERVER_NAME;" & _
"Initial Catalog=DATABASE_NAME;" & _
"User ID=mssql_userid;" & _
"Password=mssql_password;"

Apr 22, 2009 | Microsoft Visual Basic 6.0 for PC

1 Answer

How to access data from ms access with buffer in class code with vb application


Use ADO and create a connection string for a Jet file (version matters here when creating the string). Then use ADO commands and return recordsets to buffer your data.

Mar 26, 2009 | Microsoft Visual Basic 6.0 for PC

1 Answer

I want to have an example of a simple computer program system. anyone can help me?


Buckle down and search the Internet for "VB6 Code Examples." If you are after a specific example, add that to your search string.

Mar 06, 2009 | Microsoft Visual Basic Professional...

2 Answers

Visual basic 6.0


Use a compare (instr) command to search the sentence for punctution and spaces. Increment a variable for each word found, resetting the search string and retaining the start position of each find.

Feb 27, 2008 | Compilers & Programming Tools

1 Answer

Program


I wrote this as a vbscript. It's Visual Basic code in windows script. If you have XP, just copy the text into notepad and save it as "vowel.vbs". Now double click the newly created script file.

' vowel.vbs
'
' This VBScript is used to count the vowels and consonants in a string.
' Designed and Tested on Windows XP Pro SP2
'
' Version 1.0.0 - 02.20.2008
'
' This code may be freely distributed or modified.
' -----------------------------------------------------------------'

Option Explicit
Dim str
Dim vowels
Dim consonants
Dim i

vowels = 0
consonants = 0
str = "hello"

for i = 1 to len(str)
select case mid(str,i,1)
case "a"
vowels = vowels + 1
case "e"
vowels = vowels + 1
case "i"
vowels = vowels + 1
case "o"
vowels = vowels + 1
case "u"
vowels = vowels + 1
case else
consonants = consonants + 1
end select
next

msgbox "Vowels = " & vowels
msgbox "Consonants = " & consonants
'End of script.

Feb 21, 2008 | Compilers & Programming Tools

Not finding what you are looking for?
Microsoft Visual Basic 6.0 for PC Logo

Related Topics:

86 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Compilers & Programming Tools Experts

Robin Hill
Robin Hill

Level 3 Expert

1251 Answers

Alex Krenvalk

Level 2 Expert

401 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Are you a Microsoft Compiler and Programming Tool Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...