Need little help with vb6
In a settings.ini file i have a line with two commands (bike and fly)
Code:
[SETTINGS]
cmd=bike fly
I try to test if one of these two commands is used .
So i have tried these lines without success.
Can you help me please ?
Thanks
Code:
Public Function ProcessCommand(CMD As String, frm As Object) As Integer
Dim iniFile As New ClsIniFile
Dim CommandName
Dim DisableScreenName As String
Dim i As Long
iniFile.FileName = App.Path & "/settings.ini"
iniFile.ApplicationKey = "SETTINGS"
CommandName = Split(iniFile.GetValue("cmd", ""), " ")
Select Case LCase(CMD)
Case "testds"
MsgBox "This is a test", vbOKOnly, "by pierrotm777"
ProcessCommand = 2
End Select
For i = 0 To UBound(CommandName(i)) - 1
If CMD = CommandName(i) Then
CMD = "load;myskin.skin"
ProcessCommand = 3
End If
Next i
End Function