Accueil > > > MULTI-APPS
MULTI-APPS
Information sur la source
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 ...)
Sources du même auteur
Sources de la même categorie
Commentaires et avis
Discussions en rapport avec ce code source dans le forum
Lancer une application en plein ecran [ par bbernard ]
Bonjour,Je suis debutant dans ce domaine et je m'entraine en creant de petite application pour mon confort et j'ai besoin d'un peu d'aide.J'ai creer u
comment lancer des applications dans un treeview [ par smashing1664 ]
si bous pouviez m'aider a réalisé sa sa serai coolen fait le but est de faire un treeview qui lance des .exe comme un explorateur windows cl
Lancement de deux applications l'une après l'autre [ par basamir ]
Bonjour,Je me demande s'il y a possibilité de lancer à partir du même raccourci 2 applications ou plus avec un interval de temps de quelques secondes.
Lancer 2 applications externes et obtenir un évenement à leur(s) fermeture(s) [ par AL1BE ]
L'objectif est d'écrire un launcher pour lancer 2 de mes applications (tel que le ferait un shell) et de les surveiller toutes les deux.J'ai trouvé de
background [ par Claiyah ]
bonjour S.V.P je cherche comment lancer une application en background avec vb6,je vous explique mieux: j'ai une application avec vb6 qui ce lance, ell
Lancer exe en transparent avec en paramètre un fichier ini [ par ladylazy23 ]
Bonjour,Je voulais savoir s'il était possible de lancer une application en transparent sachant qu'elle est associée à un fichier ini.J'ai essayé de la
sendmessage [ par Claiyah ]
bonsoirquelqu'un peut me donner une astuce pour la fonction sendmessage en vb6 svp ?mon application consiste à lancer une installation et cliquer sur
lancer une Form à partir d'un bouton [ par simafst ]
Salut,je veux savoir comment lancer une Form lors d'un click sur un bouton d'une auter form . Merci de votre aide :)
vista vb6 [ par Claiyah ]
bonjoury a t il un moyen de surveiller un programme lancer sur vista s.v.p ?je voulais dire : lancer un programme et le surveiller jusqu'à qu'il se te
Lancer l' application en VB6 a chaque demarrage du l'ordinateur ? [ par sguenSoft ]
Bonjour , tout d'abord j'aimerais remercier vbfrance.comet tout ceux qui viennent deposer des sources et des reponses ds le forum vous m'aidez beaucou
|
Derniers Blogs
GESTION D'EXCEPTION AVEC LES TASKSGESTION D'EXCEPTION AVEC LES TASKS par richardc
Nous avons vu dans un précédent article comment utiliser Task pour effectuer des opérations dans un autre thread.
Malheureusement, comme tout le monde n'est pas parfait, il se peut que cette exécution se passe mal et qu'une exception se produise.
La...
Cliquez pour lire la suite de l'article par richardc DéMARRONS AVEC LES TASKSDéMARRONS AVEC LES TASKS par richardc
Que vous le vouliez ou non, le développement multi-tâche est maintenant une obligation pour toute nouvelle application. Il est donc vital d'en comprendre les mécanismes et de s'y mettre le plus tôt possible.
En attendant le .NET Framework 4.5 avec le...
Cliquez pour lire la suite de l'article par richardc SLIDE & DéMO TECHDAYS 2012 - FAST & FURIOUS XAML APPSSLIDE & DéMO TECHDAYS 2012 - FAST & FURIOUS XAML APPS par Vko
Retrouvez les slides et les démo de ma session Fast & Furious XAML Apps. A ceux qui se posent la question : "est-ce que le code de la DataGrid est disponible?", je vous répondrais "pas encore". Je vais mettre en place un projet codeplex pour part...
Cliquez pour lire la suite de l'article par Vko XNA IS DEAD!XNA IS DEAD! par richardc
Depuis la semaine dernière (et grâce aux TechDays 2012), je me penche activement sur la nouvelle version de Windows, aka Windows 8. Vous me direz, il était temps puisque la première preview date de Septembre dernier.
OK. Remarquez, on n'en est qu'aux...
Cliquez pour lire la suite de l'article par richardc TECHDAYS PARIS 2012 : WINDOWS SERVER "8" QUOI DE 9 !TECHDAYS PARIS 2012 : WINDOWS SERVER "8" QUOI DE 9 ! par ROMELARD Fabrice
Speakers: Fabrice Meillon et Stanislas Quastana Cette session est basée entièrement sur celle donnée lors de la BUILD cet hiver. Il n'y a pas d'ajout d'information en rapport avec cet évènement passé. Windows 8 Server sera intégralem...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice
Forum
ACCES ODBCACCES ODBC par yannickcottin
Cliquez pour lire la suite par yannickcottin
Logiciels
DocTranslate (V3.1.0.0)DOCTRANSLATE (V3.1.0.0)DocTranslate est un traducteur de document Microsoft Word, PowerPoint et Excel. Il permet d'autom... Cliquez pour télécharger DocTranslate Tribler (2012)TRIBLER (2012)Tribler est un client pair à pair (P2P/Peer-to-Peer) open source avec la capacité de regarder des... Cliquez pour télécharger Tribler OneSwarm (2012)ONESWARM (2012)Le peer-to-peer qui protège votre vie privée, c'est OneSwarm.
Ce logiciel de peer-to-peer crypté... Cliquez pour télécharger OneSwarm PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V8.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V8.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO Academy System (17.2.1.0)ACADEMY SYSTEM (17.2.1.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System
|