Equivalence de textbox.contains(variable) en vb 6.0

Fermé
yaorens Messages postés 205 Date d'inscription dimanche 5 avril 2009 Statut Membre Dernière intervention 30 mai 2013 - 21 déc. 2012 à 00:32
f894009 Messages postés 17185 Date d'inscription dimanche 25 novembre 2007 Statut Membre Dernière intervention 15 avril 2024 - 21 déc. 2012 à 08:26
Bonjour,

J'aimerais savoir quel est l'équivalent de
 textbox1.text.contains(variable) 
{ en vb .net } en vb6.0

Quelle fonction me sert de substitut ??
A voir également:

1 réponse

f894009 Messages postés 17185 Date d'inscription dimanche 25 novembre 2007 Statut Membre Dernière intervention 15 avril 2024 1 701
21 déc. 2012 à 08:26
Re bonjour,

Suite

Public x
Private Sub Command1_Click()
  x = x + 1
  Command2_Click
End Sub

Private Sub Command2_Click()
  Dim str As String
  
  str = "This string has some text"
  Command2.Caption = x
  Text1.Text = str
  
  'Equivalent de textbox1.text.contains(variable)
  'de meme pour str.contains(variable)
  
  If InStr(1, Text1.Text, "some") Then
    MsgBox ("Ok pour: Text1.Text, Trouvé")
  End If
  If InStr(1, str, "string") Then
    MsgBox ("Ok pour: str, Trouvé")
  End If
End Sub


Bonne suite
0