begin process at 2008 09 05 20:28:13
1 237 501 membres
441 nouveaux aujourd'hui
14 313 membres club

Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum.
Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !

MULTI-APPS


Information sur la source

Catégorie :Formulaire Classé sous : lancer, applications, intervalle Niveau : Débutant Date de création : 04/06/2002 Date de mise à jour : 04/06/2002 19:51:05 Vu / téléchargé: 2 179 / 138

Note :
10 / 10 - par 1 personne
10,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

Commentaire sur cette source (1)
Ajouter un commentaire et/ou une note

Description

Lance une liste d'application avec un intervale défini entre chaque lancement. Tout bête mais pratique.

Source

  • Dim nb, temps1, temps2, temps3, temps4, temps5, temps6, temps7, temps8, app1, app2, app3, app4, app5, app6, app7, app8 As String
  • Private Sub Form_Load()
  • Open "APPS.TXT" For Input As #1
  • Line Input #1, nb
  • If nb >= 1 Then
  • Line Input #1, app1
  • Line Input #1, temps1
  • End If
  • If nb >= 2 Then
  • Line Input #1, app2
  • Line Input #1, temps2
  • End If
  • If nb >= 3 Then
  • Line Input #1, app3
  • Line Input #1, temps3
  • End If
  • If nb >= 4 Then
  • Line Input #1, app4
  • Line Input #1, temps4
  • End If
  • If nb >= 5 Then
  • Line Input #1, app5
  • Line Input #1, temps5
  • End If
  • If nb >= 6 Then
  • Line Input #1, app6
  • Line Input #1, temps6
  • End If
  • If nb >= 7 Then
  • Line Input #1, app7
  • Line Input #1, temps7
  • End If
  • If nb >= 8 Then
  • Line Input #1, app8
  • Line Input #1, temps8
  • End If
  • If nb > 8 Then nb = 8
  • Close #1
  • test = Shell(app1, vbNormalFocus)
  • Timer1.Interval = temps1 * 1000
  • Timer1.Enabled = True
  • End Sub
  • Private Sub Timer1_Timer()
  • Timer1.Enabled = False
  • If nb >= 2 Then
  • test = Shell(app2, vbNormalFocus)
  • Timer2.Interval = temps2 * 1000
  • Timer2.Enabled = True
  • Else: End
  • End If
  • End Sub
  • Private Sub Timer2_Timer()
  • Timer2.Enabled = False
  • If nb >= 3 Then
  • test = Shell(app3, vbNormalFocus)
  • Timer3.Interval = temps3 * 1000
  • Timer3.Enabled = True
  • Else: End
  • End If
  • End Sub
  • Private Sub Timer3_Timer()
  • Timer3.Enabled = False
  • If nb >= 4 Then
  • test = Shell(app4, vbNormalFocus)
  • Timer4.Interval = temps4 * 1000
  • Timer4.Enabled = True
  • Else: End
  • End If
  • End Sub
  • Private Sub Timer4_Timer()
  • Timer4.Enabled = False
  • If nb >= 5 Then
  • test = Shell(app5, vbNormalFocus)
  • Timer5.Interval = temps5 * 1000
  • Timer5.Enabled = True
  • Else: End
  • End If
  • End Sub
  • Private Sub Timer5_Timer()
  • Timer5.Enabled = False
  • If nb >= 6 Then
  • test = Shell(app6, vbNormalFocus)
  • Timer6.Interval = temps6 * 1000
  • Timer6.Enabled = True
  • Else: End
  • End If
  • End Sub
  • Private Sub Timer6_Timer()
  • Timer6.Enabled = False
  • If nb >= 7 Then
  • test = Shell(app7, vbNormalFocus)
  • Timer7.Interval = temps7 * 1000
  • Timer7.Enabled = True
  • Else: End
  • End If
  • End Sub
  • Private Sub Timer7_Timer()
  • Timer7.Enabled = False
  • If nb = 8 Then
  • test = Shell(app8, vbNormalFocus)
  • Timer8.Interval = temps8 * 1000
  • Timer8.Enabled = True
  • Else: End
  • End If
  • End Sub
  • Private Sub Timer8_Timer()
  • Timer8.Enabled = False
  • End
  • End Sub
Dim nb, temps1, temps2, temps3, temps4, temps5, temps6, temps7, temps8, app1, app2, app3, app4, app5, app6, app7, app8 As String
Private Sub Form_Load()
Open "APPS.TXT" For Input As #1
Line Input #1, nb
If nb >= 1 Then
Line Input #1, app1
Line Input #1, temps1
End If
If nb >= 2 Then
Line Input #1, app2
Line Input #1, temps2
End If
If nb >= 3 Then
Line Input #1, app3
Line Input #1, temps3
End If
If nb >= 4 Then
Line Input #1, app4
Line Input #1, temps4
End If
If nb >= 5 Then
Line Input #1, app5
Line Input #1, temps5
End If
If nb >= 6 Then
Line Input #1, app6
Line Input #1, temps6
End If
If nb >= 7 Then
Line Input #1, app7
Line Input #1, temps7
End If
If nb >= 8 Then
Line Input #1, app8
Line Input #1, temps8
End If
If nb > 8 Then nb = 8
Close #1
test = Shell(app1, vbNormalFocus)
Timer1.Interval = temps1 * 1000
Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer()
Timer1.Enabled = False
If nb >= 2 Then
test = Shell(app2, vbNormalFocus)
Timer2.Interval = temps2 * 1000
Timer2.Enabled = True
Else: End
End If
End Sub
Private Sub Timer2_Timer()
Timer2.Enabled = False
If nb >= 3 Then
test = Shell(app3, vbNormalFocus)
Timer3.Interval = temps3 * 1000
Timer3.Enabled = True
Else: End
End If
End Sub
Private Sub Timer3_Timer()
Timer3.Enabled = False
If nb >= 4 Then
test = Shell(app4, vbNormalFocus)
Timer4.Interval = temps4 * 1000
Timer4.Enabled = True
Else: End
End If
End Sub
Private Sub Timer4_Timer()
Timer4.Enabled = False
If nb >= 5 Then
test = Shell(app5, vbNormalFocus)
Timer5.Interval = temps5 * 1000
Timer5.Enabled = True
Else: End
End If
End Sub
Private Sub Timer5_Timer()
Timer5.Enabled = False
If nb >= 6 Then
test = Shell(app6, vbNormalFocus)
Timer6.Interval = temps6 * 1000
Timer6.Enabled = True
Else: End
End If
End Sub
Private Sub Timer6_Timer()
Timer6.Enabled = False
If nb >= 7 Then
test = Shell(app7, vbNormalFocus)
Timer7.Interval = temps7 * 1000
Timer7.Enabled = True
Else: End
End If
End Sub
Private Sub Timer7_Timer()
Timer7.Enabled = False
If nb = 8 Then
test = Shell(app8, vbNormalFocus)
Timer8.Interval = temps8 * 1000
Timer8.Enabled = True
Else: End
End If
End Sub
Private Sub Timer8_Timer()
Timer8.Enabled = False
End
End Sub

Conclusion

Il Faut :
- Une form
- 8 timers numérotés (timer1, timer2 ...)
Pour les "Membres Club", vous pouvez télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !

Télécharger le zip

  • signaler à un administrateur
    Commentaire de yoman64 le 05/06/2002 17:59:32

    Tu la mis 2 fois non? et cest possible de le mettre juste dans un timer qui change dinterval apres chaque exection(il faut plus de mathematique)
    Mais cest utile...
    Merci

Ajouter un commentaire

Pub



Appels d'offres

CalendriCode

Septembre 2008
LMMJVSD
1234567
891011121314
15161718192021
22232425262728
2930     

VS Express FR Gratuit !

VS Express en français et 100% gratuit !

Téléchargements

Boutique

Boutique de goodies CodeS-SourceS