WIDGETS GAMBAS
LOGICIELS GAMBAS 3
TUTORIELS
VISITES
Où ça, qui ça?
|
Creer son logiciel - Lancement unique d'un prog
Lancement unique de votre programme
bonsoir, Taoteblue nous livre aujourd'hui une astuce fort interessante. En effet cette petite routine sert à tester l'existence de votre application dans les taches lancées. Ainsi, vous ne pourrez pas lancer deux fois votre application. Voici le code : PUBLIC SUB Form_Open() DIM Sortie AS String EXEC ["pgrep", "-f", "-l", "le_nom_de_mon_programme.gambas"] WAIT TO Sortie IF Split(Trim$(Sortie), gb.NewLine).Count > 1 THEN Message.Info("Programme déjà ouvert", "Fermer") ME.Close ELSE 'la suite du programme ENDIF END A bientôt Date de création : 10/08/2010 @ 23:28 ![]()
| ACCES RAPIDE
RECHERCHE
LOGICIELS GAMBAS 2
LES INSTRUCTIONS
LES COMPOSANTS
Divers
|