Dim sMots() As String Dim sPhrase As String Dim cntMot As Integer Private Sub Form_Load() sMots = Split(sPhrase, " ") sPhrase = "Bonjour et bienvenue à toi, fier ami du peuple du Rohan" cntMot = 0 End Sub Private Sub tmr1_Timer() lblWord.Caption = lblWord.Caption & sMots(cntMot) & " " cntMot = cntMot + 1 End Sub
Private Sub Form_Load() Timer1.Interval = 3000 '3sec Timer1.Enabled = True End Sub Private Sub timer1_Timer() Static Passage As Integer Passage = Passage + 1 Select Case Passage Case 1: Label1 = "Bonjour," Case 2: Label1 = "Bienvenue à toi visteur." Case 3: Label1 = "Grandissime Pcpunch" Case 4: Label1 = "Je te remercie" Case 5: Label1 = "pour tes précieux conseils lol... :)" End Select If Passage 5 Then Passage 0 'on recomence End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPrivate Phrases() as String Private Idx as Long
Dim i as long,Buffer as String i = freefile Open "mesphrases.txt" for input as #i Buffer = Input(lof(i),#i) Close #i Phrases = Split(Buffer,vbCrLf) Idx = -1
Idx = Idx +1 If Idx > UBound(Phrases) then Idx = 0 Lablel1.caption = Phrases(Idx)