Accueil > > > CALCULATRICE
CALCULATRICE
Information sur la source
Description
cette calculatrice est mon premier programme donc elle est faite avec des truk simple (if then ...). la source est lourde mais facille a comprendre enfin ... je croi.
Source
Private Sub Command1_Click()
If Text1 <> "" Then Text1 = Text1 * 10 + 7
If Text1 = "" Then Text1 = 7
End Sub
Private Sub Command10_Click()
If Text1 <> "" Then Text1 = Text1 * 10
If Text1 = "" Then Text1 = 0
End Sub
Private Sub Command11_Click()
If Text2 = "" Then
Text2 = Text1
Text6 = "+"
End If
If Text3 = "" And Text2 <> Text1 Then
Text3 = Text1
Text7 = "+"
End If
If Text4 = "" And Text3 <> Text1 And Text2 <> Text1 Then
Text4 = Text1
Text8 = "+"
End If
If Text5 = "" And Text4 <> Text1 And Text3 <> Text1 And Text2 <> Text1 Then Text5 = Text1
Text1 = 0
End Sub
Private Sub Command12_Click()
n1 = 0
n2 = 0
n3 = 0
n4 = 0
If Text3 = "" And Text2 <> Text1 Then Text3 = Text1
If Text4 = "" And Text3 <> Text1 And Text2 <> Text1 Then Text4 = Text1
If Text5 = "" And Text4 <> Text1 And Text3 <> Text1 And Text2 <> Text1 Then Text5 = Text1
If Text6 = "+" Then n1 = 1
If Text6 = "-" Then n1 = 2
If Text6 = "*" Then n1 = 3
If Text6 = "/" Then n1 = 4
If Text7 = "+" Then n2 = 1
If Text7 = "-" Then n2 = 2
If Text7 = "*" Then n2 = 3
If Text7 = "/" Then n2 = 4
If Text8 = "+" Then n3 = 1
If Text8 = "-" Then n3 = 2
If Text8 = "*" Then n3 = 3
If Text8 = "/" Then n3 = 4
If n1 = 1 Then n4 = Text2 - 1 + 1 + Text3
If n1 = 2 Then n4 = Text2 - Text3
If n1 = 3 Then n4 = Text2 * Text3
If n1 = 4 Then n4 = Text2 / Text3
If n2 = 1 Then n4 = n4 - 1 + 1 + Text4
If n2 = 2 Then n4 = n4 - Text4
If n2 = 3 Then n4 = n4 * Text4
If n2 = 4 Then n4 = n4 / Text4
If n3 = 1 Then n4 = n4 - 1 + 1 + Text5
If n3 = 2 Then n4 = n4 - Text5
If n3 = 3 Then n4 = n4 * Text5
If n3 = 4 Then n4 = n4 / Text5
Text1 = n4
End Sub
Private Sub Command13_Click()
If Text2 = "" Then Text2 = Text1
If Text2 = Text1 Then Text6 = "-"
If Text3 = "" And Text2 <> Text1 Then Text3 = Text1
If Text3 = Text1 Then Text7 = "-"
If Text4 = "" And Text3 <> Text1 And Text2 <> Text1 Then Text4 = Text1
If Text4 = Text1 Then Text8 = "-"
If Text5 = "" And Text4 <> Text1 And Text3 <> Text1 And Text2 <> Text1 Then Text5 = Text1
Text1 = 0
End Sub
Private Sub Command14_Click()
If Text2 = "" Then Text2 = Text1
If Text2 = Text1 Then Text6 = "*"
If Text3 = "" And Text2 <> Text1 Then Text3 = Text1
If Text3 = Text1 Then Text7 = "*"
If Text4 = "" And Text3 <> Text1 And Text2 <> Text1 Then Text4 = Text1
If Text4 = Text1 Then Text8 = "*"
If Text5 = "" And Text4 <> Text1 And Text3 <> Text1 And Text2 <> Text1 Then Text5 = Text1
Text1 = 0
End Sub
Private Sub Command15_Click()
If Text2 = "" Then Text2 = Text1
If Text2 = Text1 Then Text6 = "/"
If Text3 = "" And Text2 <> Text1 Then Text3 = Text1
If Text3 = Text1 Then Text7 = "/"
If Text4 = "" And Text3 <> Text1 And Text2 <> Text1 Then Text4 = Text1
If Text4 = Text1 Then Text8 = "/"
If Text5 = "" And Text4 <> Text1 And Text3 <> Text1 And Text2 <> Text1 Then Text5 = Text1
Text1 = 0
End Sub
Private Sub Command16_Click()
End
End Sub
Private Sub Command17_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
Text8 = ""
End Sub
Private Sub Command2_Click()
If Text1 <> "" Then Text1 = Text1 * 10 + 8
If Text1 = "" Then Text1 = 8
End Sub
Private Sub Command3_Click()
If Text1 <> "" Then Text1 = Text1 * 10 + 9
If Text1 = "" Then Text1 = 9
End Sub
Private Sub Command4_Click()
If Text1 <> "" Then Text1 = Text1 * 10 + 4
If Text1 = "" Then Text1 = 4
End Sub
Private Sub Command5_Click()
If Text1 <> "" Then Text1 = Text1 * 10 + 5
If Text1 = "" Then Text1 = 5
End Sub
Private Sub Command6_Click()
If Text1 <> "" Then Text1 = Text1 * 10 + 6
If Text1 = "" Then Text1 = 6
End Sub
Private Sub Command7_Click()
If Text1 <> "" Then Text1 = Text1 * 10 + 1
If Text1 = "" Then Text1 = 1
End Sub
Private Sub Command8_Click()
If Text1 <> "" Then Text1 = Text1 * 10 + 2
If Text1 = "" Then Text1 = 2
End Sub
Private Sub Command9_Click()
If Text1 <> "" Then Text1 = Text1 * 10 + 3
If Text1 = "" Then Text1 = 3
End Sub
Sources de la même categorie
Commentaires et avis
Discussions en rapport avec ce code source dans le forum
Calcul de distances... [ par DragonDo ]
Salut à tous,Quelqu'un sait-il comment calculer la distance entre deux points du globe en connaissant les coordonnées gps de ceux-ci. Dans la lancée,
Pi mais comment on calcul Pi ??? [ par koubihack ]
c'est que l'on demande souvent à ceux qui font de l'informatique (plus précisement de la programmation) de calculer Pi avec 10 000 000 de virgules, pe
calcul de cpu [ par rerereda ]
Bonjour tout le monde,Je voudrais savoir s'il y a un programme qui permet de calculer et d'afficher en temps reel la charge CPU.Comment faire en CShar
calcul mathématique [ par breton53 ]
un peu d'aide pour débutantJe dois concevoir un programme: pour calculer le max, le min et la moy des valeurs stockées dans un tableau 1D (temp()) lo
Calculer la dérivée d'une courbe [ par violent_ken ]
Violent Ken bonjour.j'ai créé un programme pour tracer des courbes et leurs dérivée (première et seconde)==> <A HREF="/cod
CALCUL SUR FLEXGRID [ par Gamaldiouf ]
Bonjour je vous demande qui peut m'aider à calcul ces données sur flexgrid je n'est jamais utiliser flexgrid pour calculer j'ai un grille flexgrid
Calculer le temps de calcul d'algorithmes mathématiques? [ par ZarathoustraQC ]
Bonjours,Je suis un jeune étudiant et j'aimerais savoir si il existe un moyen ou un programme pour calculer le temps que prend un processus pour accom
calcul dans un datagrid [ par the_daren ]
Bonjour,le probleme est que j'arrive a calculer sur une table entiere mais pas sur une partie car dans le load je peut choisir une annee et donc le da
Calcul d'heure et date [ par raphael_george ]
Bonjour, je désire calculer les heures effectuée entre le départ et l'arrivée je part du format suivant: Date départ:15/09/06 10:00 Date arrivée:16/09
calcul des dates [ par meorme ]
salut tous, pendant la realisation de mon PFE (sujet: gestion des projets informatiques)j'ai rencontré un probleme qui est le suivant: je dois calcule
|
Derniers Blogs
IMAGINE CUP 2012, MAKE A SIGN EN FINALEIMAGINE CUP 2012, MAKE A SIGN EN FINALE par junarnoalg
Voilà qui est fait, la nouvelle est officielle ! L'équipe belge "Make a Sign" va au pays des kangourous défendre son projet dans la catégorie Software Design. http://www.imaginecup.com/CompetitionsContent/Competition/WorldwideFinalists.aspx V...
Cliquez pour lire la suite de l'article par junarnoalg KINECT 1.5 IS OUT !KINECT 1.5 IS OUT ! par Vko
La version 1.5 du Kinect For Microsoft vient tout juste de sortir ! Plein de nouveautés: Tracking de squelette en Near Mode Détection en position assise Détection faciale avec un SDK dédié Documentation et des guideline (enfin) Un out...
Cliquez pour lire la suite de l'article par Vko LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) par richardc
Mise à jour des Web API du 14 Mai
Réservez dès maintenant votre journée du 20 juin pour le Windows Azure Dev Camp 2012 à Paris
Mise à jour de Team Foundation Service
MechCommander 2 sur Windows 8
Entity Framework 5 Release Candidate e...
Cliquez pour lire la suite de l'article par richardc REACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITERREACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITER par Groc
Une mauvaise utilisation de rx lors de l'écriture d'une couche d'accès à des services peut conduire à des cas embarassants avec des erreurs mal gérées, des appels qui ne partent lorsqu'ils le devraient, et même des résultats incorrects . le tout nuis...
Cliquez pour lire la suite de l'article par Groc SHAREPOINT BLOG SITE, PROBLèME D'ARCHIVESSHAREPOINT BLOG SITE, PROBLèME D'ARCHIVES par junarnoalg
Dernièrement, nous avons migré le site
myTIC
vers un nouveau serveur SharePoint 2010. Dans les contenus que nous vouloins récupérer, nous avions un certain nombre de blogs.
Nous avons utilisé les commandes Power...
Cliquez pour lire la suite de l'article par junarnoalg
Logiciels
sDEVIS-FACTURES vlPRO (8.1.0.3)SDEVIS-FACTURES VLPRO (8.1.0.3)sDEVIS-FACTURES vlPRO a été mis au point pour les particuliers, créateurs, entrepreneurs, artisa... Cliquez pour télécharger sDEVIS-FACTURES vlPRO 974 Application Server (12.2.4.6)974 APPLICATION SERVER (12.2.4.6)Développez de puissantes applications dans un environnement de 'cloud computing', clusterisé, séc... Cliquez pour télécharger 974 Application Server vPicture (1.4.2.1)VPICTURE (1.4.2.1)Avec vPicture, hébergez vos images facilement et rapidement.
vPicture est un utilitaire simple, ... Cliquez pour télécharger vPicture Easy-Planning (2.2.1.6)EASY-PLANNING (2.2.1.6)Easy-Planning permet de créer des plannings sous la représentation de diagrammes et est adapté au... Cliquez pour télécharger Easy-Planning COM-BACKUP (2.0)COM-BACKUP (2.0)
COM-BACKUP est un logiciel de sauvegarde qui permet de planifier les sauvegardes de vos dossiers ...
Cliquez pour télécharger COM-BACKUP
|