seems that i realy must abandoned the VB6
i have several errors with IDE(i'm using windows 7). and i have VS201 installed.
i have several code for convert, but some code ins't used in VB2010
like vbscript code
but it's there any way for convert the code?
Code:
Public Function ExtendedSplit(ByVal strInputString As String) As String()
Dim i As Integer
Dim objRegExp
Dim objMatch
Dim colMatches
Dim strTestInput As String
Dim strOldValue As String
Dim strNewValue As String
Dim tempArr() As String
' Create a regular expression object.
Set objRegExp = CreateObject("VBScript.RegExp")
'Set the pattern.
objRegExp.Pattern = "\"".*?\"""
'Set global applicability.
objRegExp.Global = True
'Test whether the String can be compared.
If (objRegExp.Test(strInputString) = True) Then
'Get the matches.
Set colMatches = objRegExp.Execute(strInputString)
' Iterate Matches collection.
For Each objMatch In colMatches
strOldValue = objMatch.Value
strNewValue = Replace(strOldValue, Chr(34), Chr(128))
strNewValue = Replace(strNewValue, Chr(32), Chr(129))
'Debug.Print objMatch.Value
strInputString = Replace(strInputString, strOldValue, strNewValue)
Next
End If
For i = 1 To 127
Select Case i
Case 1 To 47, 59 To 64, 91 To 96, 123 To 127
strInputString = Replace(strInputString, Chr(i), " " & Chr(i) & " ")
End Select
Next i
Do While InStr(strInputString, Space(2))
strInputString = Replace(strInputString, Space(2), Space(1))
Loop
strInputString = Trim(strInputString)
tempArr = Split(strInputString, " ")
For i = 0 To UBound(tempArr)
tempArr(i) = Replace(tempArr(i), Chr(128), Chr(34))
tempArr(i) = Replace(tempArr(i), Chr(129), Chr(32))
Next i
ExtendedSplit = tempArr
End Function
and can i convert a ctl file?