Fichier Visual Basic du programme générateur aléatoire de cris d oiseaux page 1/8



Documents pareils
Travaux Pratiques de Commande par ordinateur 1 TRAVAUX PRATIQUES

Rapport de Mini-Projet en ArcGIS Engine

Programmation Visual Basic. Visite guidée d'un programme Visual Basic 6.0

PROGRAMMATION EVENEMENTIELLE sur EXCEL

Programmation VBA/Excel. Programmation VBA. Pierre BONNET. Masters SMaRT & GSI - Supervision Industrielle P. Bonnet

Création d installateurs pour Windows avec InnoSetup

.NET - Classe de Log

Application 1- VBA : Test de comportements d'investissements

Sub CalculAnnuite() Const TITRE As String = "Calcul d'annuité de remboursement d'un emprunt"

Visual Basic for Applications

Applications des mathématiques pdf. Introduction à la Programmation en Visual Basic 6

Algorithmique et programmation : les bases (VBA) Corrigé

Comment Connecter une Base de Données MySQL via un Driver JDBC Avec OpenOffice.org

Paginer les données côté serveur, mettre en cache côté client

Démarreur-testeur par ordinateur via le port USB d un PC pour moteurs asynchrones triphasés

Examen Médian - 1 heure 30

Corrigé des TD 1 à 5

Convers3 Documentation version Par Eric DAVID : vtopo@free.fr

Gestion du cache dans les applications ASP.NET

Formation VBA 3 Interagir

Préparation à l examen EFA en Macro

IUT BREST UN LOGICIEL SCADA : PC VUE 2010 DEP.GMP

Algorithmique & programmation

De quoi avez-vous besoin pour ce manuel?

Importantes instructions de sécurité

FORMATION au VBA Pour EXCEL. Version 2007 & +

Listes de validation dans OpenOffice Calc

Programmation avec Microsoft Visual Basic. NET. Réponses aux questions Solutions des exercices

GAZLOG. Logiciel de téléchargement et d'exploitation de données. Notice d utilisation. Tél. : Fax :

Environnements informatiques

MANUEL. de l application «CdC Online» pour Windows. Table des matières

Le hub d entreprise est une application de déploiement des applications mais aussi un outil de communication

Reekin Timemaster Station météo

Utilitaires méconnus de StrataFrame

OPTENET DCAgent Manuel d'utilisateur

Sauvegarder automatiquement ses documents

Conception, réalisation et mise en place d applications de supervision orientée métier au sein du groupe France Télécom

Appareil photo de surveillance numérique infrarouge Manuel de l'utilisateur

Ordinateurs, Structure et Applications

Module.NET 3 Les Assemblys.NET

Initiation à VBA pour Excel. Philippe Bernard Ingénierie Economique et Financière Université Paris-Dauphine

Utiliser WebCamFirst

1. Utilisation conforme à l usage prévu. 2. Propriétés. 3. Montage. Capteur de CO 2 AMUN

Présentation du logiciel Cobian Backup

Le MSMQ. Version 1.0. Pierre-Franck Chauvet

1. Structure d'un programme FORTRAN 95

Notice d emploi. PROGRAMMATEUR HT1 température pour coffret de BRUMISATION HAUTE PRESSION

PROCÉDURE D'INSTALLATION WINDOWS 7 (32 ou 64 bit)

ACTIVITÉ DE PROGRAMMATION

Procédure de mise à niveau de Windows Mobile version 6.1 du SGH-i616

Enseignement secondaire technique

Comment créer et utiliser une fonction

elprolog MONITOR Manuel d utilisation

Windows Internet Name Service (WINS)

Raccordement desmachines Windows 7 à SCRIBE

Salle Jupiter. Fonctionnement.

Cours Informatique Master STEP

LOGICIEL ALARM MONITORING

Guide de démarrage rapide

Atelier C TIA Portal CTIA06 : programmation des automates S7-300 Blocs d organisation

GUIDE NSP Activation et gestion des produits avec NSP

OCLOUD BACKUP GUIDE DE REFERENCE POUR ANDROID

epowerswitch 4M+ Fiche technique

Xubuntu Une alternative à Windows et à Ubuntu, (pour ceux qui ne veulent pas d'unity) : installer Xubuntu.

Chapitre 10. Les interfaces Comparable et Comparator 1

Configuration de la Borne Interactive

But de cette présentation

LOGICIEL DE SURVEILLANCE NUUO NOTICE

Développement Logiciel

OpenOffice.org et les bases de données.

Capture Pro Software. Démarrage. A-61640_fr

Paris Airports - Web API Airports Path finding

Arbres binaires de recherche

AUTORISER LES PARTAGES RESEAUX ET IMPRIMANTE SOUS L'ANTIVIRUS FIREWALL PRO V1

PCTV Systems TVCenter

MODE D EMPLOI PC-430L

Jay-Tech. Tablette PC 799

Guide pour sécuriser votre PC avec Kiosk Internet et Windows Seven

TCHATONS PAR LIAISON SANS FIL BLUETOOTH

Développer sous Microsoft Visual Basic 6. Denis Szalkowski - Tous droits réservés

Mode d emploi. Appareil de programmation Multi

OnDemand Version 1.7. Manuel d installation et d utilisation. AST Technology. Sophienstrasse Herford Allemagne

REMBO Version 2.0. Mathrice 2004 DESCRIPTION MISE EN OEUVRE CONCLUSION.

How to «Lier des tables à l'aide de paramètres nommés SQL»

Cadastre du bruit SIT-JURA. Connecteur Arcview9.x - MSAccess. Mode d emploi. Appel formulaire. Page 1 sur 15

Les pannes non bloquantes ou aléatoires :


1.0 Introduction. Guide général

2 Raccordement d une imprimante, d un terminal ou d un ordinateur au DULCOMARIN

Plan du cours Cours théoriques. 29 septembre 2014

Cours Bases de données 2ème année IUT

Squid. Olivier Aubert 1/19

1.1 Guide rapide. Pour connecter votre PC à la Vivo 30/40 à l'aide de câbles. [ Guide rapide Vivo 30/Vivo 40 Logiciel Aide v4.01]

Valeur cible et solveur. Les calculs effectués habituellement avec Excel utilisent des valeurs numériques qui constituent les données d'un problème.

AMICUS 18 (2ème partie) 4) Présentation du logiciel Amicus IDE

SMS-COM LT RAILS DIN V Manuel d installation, de programmation et d utilisation.

GSM/GPRS/GPS Traceur Véhicule G-1000 PRO Manuel D utilisation

NE PAS INSERER DE CD FAIT POUR WINDOWS LORS DE L'INSTALLATION D'INTERNET NE PAS INSERER LE CD D'INSTALLATION DE VOTRE FOURNISSEUR D'ACCES

KAJOUT WASSIM INTERNET INFORMATION SERVICES (IIS) 01/03/2013. Compte-rendu sur ISS KAJOUT Wassim

Cyber-base du Pays Martégal. Atelier «Découverte de l ordinateur»

Transcription:

Fichier Visual Basic du programme générateur aléatoire de cris d oiseaux page 1/8 ' ' ' programme sons aleatoires d'oiseaux ' premier mai 2005 ' revision le 17 juin 2006 ' 'declarations Dim soundfile As String, worked As Integer Dim i As Long, intervalle 'sous programmes actionnes par les touches de tests portant les noms d'animaux Private Sub Command1_Click() End Private Sub Command11_Click() Dim i As Long i = ExitWindowsEx(1, 0) Private Sub Command12_Click() Falco_biarmicus Text4 = "Falco biarmicus" Private Sub Command13_Click() Falco_cherrug Text4 = "Falco cherrug" Private Sub Command14_Click() Falco_columbarius Text4 = "Falco columbarius" Private Sub Command15_Click() Falco_eleonorae Text4 = "Falco eleonorae" Private Sub Command16_Click() Falco_naumanni Text4 = "Falco naumanni" Private Sub Command17_Click() Falco_peregrinus Text4 = "Falco peregrinus" Private Sub Command18_Click() Falco_rusticolus Text4 = "Falco rusticolus" Private Sub Command2_Click() aquila_heliaca Text4 = "Aquila heliaca"

Fichier Visual Basic du programme générateur aléatoire de cris d oiseaux page 2/8 Private Sub Command3_Click() aquila_clanga Text4 = "Aquila clanga" Private Sub Command4_Click() aquila_pomarina Text4 = "Aquila pomarina" Private Sub Command5_Click() aquila_chrysaetos Text4 = "Aquila chrysaetos" Private Sub Command6_Click() buteo_buteo Text4 = "Buteo buteo" Private Sub Command7_Click() buteo_lagopus Text4 = "Buteo lagopus" Private Sub Command8_Click() buteo_rufinus Text4 = "Buteo rufinus" Private Sub Command9_Click() fox_yell Text4 = "Fox yell" Private Sub Command10_Click() fox_prairie Text4 = "Fox prairie" Private Sub Command19_Click() Renard_1 Text4 = "Renard 1" Private Sub Command20_Click() Renard_2 Text4 = "Renard 2" Private Sub Command21_Click() Faucon Text4 = "Faucon" Private Sub Command22_Click() Faucon_crecelle Text4 = "Faucon crécelle"

Fichier Visual Basic du programme générateur aléatoire de cris d oiseaux page 3/8 Private Sub Command23_Click() Buse Text4 = "Buse" ' 'genere des cris d'animaux que de 8 a 21 heures 'genere des nombres aleatoires toutes les 10 secondes 'on risque donc d'entendre des cris d'animaux toutes les dix secondes Private Sub Form_Load() Timer2.Interval = 1000 'declenche le generateur entre 8 heure et 21 heures heure = Hour(Time) If (1 = 1) Then 'ici le reglage de la periode de tirage de nombres aleatoires (60000 = toutes les 60 secondes) intervalle = 30 Text5 = Str(intervalle) + " seconde(s)." intervalle = 1000 * intervalle Timer1.Interval = intervalle InitRnd 'Private Sub Command19_Click() ' intervalle = InputBox("Saisie de l'intervalle en secondes (< 60).") ' Text5 = Str(intervalle) + " seconde(s)." ' intervalle = 1000 * intervalle ' 'arrete le PC a 21 heures ' si on allume le PC entre 21 heures et 8 heures du matin et que ce programme 'generateurs aleatoire de cris d'oiseaux est automatiquement demarre lors du demarrage du PC 'le programme aussitot arrete le PC Private Sub Timer2_Timer() 'affiche l'heure et arrete l'ordinateur t$ = Time$ Text1 = t$ If (t$ > "21:00:00") Then i = ExitWindowsEx(1, 0) 'sous programme principal Private Sub Timer1_Timer() Dim soundfile As String, worked As Integer heure_courante = Hour(Time) minute_courante = Minute(Time) Text2 = Date$ 'on recueille le chiffre des seconde de l'horloge du PC 'on genere autant de nombre aleatoires que de cris d'animaux chiffre0 = minute_courante Text6 = minute_courante chiffre1 = Fix(Rnd * 100) chiffre2 = Fix(Rnd * 100) chiffre3 = Fix(Rnd * 100) chiffre4 = Fix(Rnd * 100) chiffre5 = Fix(Rnd * 100) chiffre6 = Fix(Rnd * 100) chiffre7 = Fix(Rnd * 100)

Fichier Visual Basic du programme générateur aléatoire de cris d oiseaux page 4/8 chiffre8 = Fix(Rnd * 100) chiffre9 = Fix(Rnd * 100) chiffre10 = Fix(Rnd * 100) chiffre11 = Fix(Rnd * 100) chiffre12 = Fix(Rnd * 100) chiffre13 = Fix(Rnd * 100) chiffre14 = Fix(Rnd * 100) chiffre15 = Fix(Rnd * 100) chiffre16 = Fix(Rnd * 100) chiffre17 = Fix(Rnd * 100) chiffre18 = Fix(Rnd * 100) chiffre19 = Fix(Rnd * 100) chiffre20 = Fix(Rnd * 100) chiffre21 = Fix(Rnd * 100) 'transformation de ces nombre aleatoires en chaines de caracteres pour les afficher a$ = chiffre1 b$ = chiffre2 c$ = chiffre3 d$ = chiffre4 e$ = chiffre5 f$ = chiffre6 g$ = chiffre7 h$ = chiffre8 k$ = chiffre9 l$ = chiffre10 m$ = chiffre11 n$ = chiffre12 o$ = chiffre13 p$ = chiffre14 q$ = chiffre15 r$ = chiffre16 t$ = chiffre17 u$ = chiffre18 v$ = chiffre19 w$ = chiffre20 x$ = chiffre21 'affichage des tous ces nombres aleatoires Text3 = a$ + " " + b$ + " " + c$ + " " + d$ + " " + e$ + " " + f$ + " " + g$ + " " + g$ + " " + k$ + " " + l$ + " " + m$ + " " + n$ + " " + o$ + " " + p$ + " " + q$ + " " + r$ + " " + s$ + " " + t$ + " " + u$ + " " + v$ + " " + w$ + " " + x$ 'si un des nombres aleatoires est egal au nombre des seconde, on declenche un cri d'animal correspondant If (chiffre0 = chiffre1) Then Command12_Click If (chiffre0 = chiffre2) Then Command13_Click If (chiffre0 = chiffre3) Then Command14_Click If (chiffre0 = chiffre4) Then Command15_Click

Fichier Visual Basic du programme générateur aléatoire de cris d oiseaux page 5/8 If (chiffre0 = chiffre5) Then Command16_Click If (chiffre0 = chiffre6) Then Command17_Click If (chiffre0 = chiffre7) Then Command18_Click If (chiffre0 = chiffre8) Then Command2_Click If (chiffre0 = chiffre9) Then Command3_Click If (chiffre0 = chiffre10) Then Command4_Click If (chiffre0 = chiffre11) Then Command5_Click If (chiffre0 = chiffre12) Then Command6_Click If (chiffre0 = chiffre13) Then Command7_Click If (chiffre0 = chiffre14) Then Command8_Click If (chiffre0 = chiffre15) Then Command9_Click If (chiffre0 = chiffre16) Then Command10_Click If (chiffre0 = chiffre17) Then Command19_Click If (chiffre0 = chiffre18) Then Command20_Click If (chiffre0 = chiffre19) Then Command21_Click

Fichier Visual Basic du programme générateur aléatoire de cris d oiseaux page 6/8 If (chiffre0 = chiffre20) Then Command22_Click If (chiffre0 = chiffre21) Then Command23_Click ' 'chaque sous programme declenche le fichier son correspondant a un cri d'animal Public Sub aquila_heliaca() soundfile = "c:\oiseaux\aquila.heliaca.wav" Public Sub aquila_clanga() soundfile = "c:\oiseaux\aquila.clanga.wav" Public Sub aquila_pomarina() soundfile = "c:\oiseaux\aquila.pomarina.wav" Public Sub aquila_chrysaetos() soundfile = "c:\oiseaux\aquila.chrysaetos.wav" Public Sub buteo_buteo() soundfile = "c:\oiseaux\buteo.buteo.wav" Public Sub buteo_lagopus() soundfile = "c:\oiseaux\buteo.lagopus.wav" Public Sub buteo_rufinus() soundfile = "c:\oiseaux\buteo.rufinus.wav" Public Sub fox_yell() soundfile = "c:\oiseaux\fox.yell.wav" Public Sub fox_prairie() soundfile = "c:\oiseaux\fox.prairie.wav"

Fichier Visual Basic du programme générateur aléatoire de cris d oiseaux page 7/8 Public Sub Falco_biarmicus() soundfile = "c:\oiseaux\falco.biarmicus.wav" Public Sub Falco_cherrug() soundfile = "c:\oiseaux\falco.cherrug.wav" Public Sub Falco_columbarius() soundfile = "c:\oiseaux\falco.columbarius.wav" Public Sub Falco_eleonorae() soundfile = "c:\oiseaux\falco.eleonorae.wav" Public Sub Falco_naumanni() soundfile = "c:\oiseaux\falco.naumanni.wav" Public Sub Falco_peregrinus() soundfile = "c:\oiseaux\falco.peregrinus.wav" Public Sub Falco_rusticolus() soundfile = "c:\oiseaux\falco.rusticolus.wav" Public Sub Renard_1() soundfile = "c:\oiseaux\renard_1.wav" Public Sub Renard_2() soundfile = "c:\oiseaux\renard_2.wav" Public Sub Faucon() soundfile = "c:\oiseaux\faucon.wav" Public Sub Faucon_crecelle() soundfile = "c:\oiseaux\faucon_crecelle.wav" Public Sub Buse() soundfile = "c:\oiseaux\buse.wav"

Fichier Visual Basic du programme générateur aléatoire de cris d oiseaux page 8/8 MODULE #If Win32 Then Declare Function sndplaysound Lib "winmm" Alias "sndplaysounda" (ByVal lpsound As String, ByVal flag As Integer) As Long #ElseIf Win16 Then Declare Function sndplaysound Lib "MMSYSTEM" (ByVal lpszsound As String, ByVal uflag As Integer) As Integer # Public Declare Function ExitWindowsEx Lib "user32" (ByVal uflags As Long, ByVal dwreserved As Long) As Long 'pour generer des nombres aleatoires differents a chaque demarrages Public Sub InitRnd() Randomize Timer