begin process at 2012 05 27 22:00:13
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Divers

 > CALCULATRICE

CALCULATRICE


 Information sur la source

Note :
Aucune note
Catégorie :Divers Classé sous :calculatrice, mathématique, calcul, calculer Niveau :Débutant Date de création :08/01/2002 Date de mise à jour :08/01/2002 16:23:57 Vu / téléchargé :2 859 / 162

Auteur : ekinoks

Ecrire un message privé
Site perso
Commentaire sur cette source (3)
Ajouter un commentaire et/ou une note

 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
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

 


 Fichier Zip

Les Membres Club peuvent télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !

Télécharger le zip


 Sources de la même categorie

Source avec Zip EDITION D'ÉTIQUETTES SANS OUTIL EXTERNE par ucfoutu
Source avec Zip Source .NET (Dotnet) APPRENDRE À PRONONCER LES MOTS ANGLAIS par alpha5
Source avec Zip Source .NET (Dotnet) AFFICHAGE DE TEXTE DANS UNE PICTUREBOX par alpha5
Source avec Zip TEXTBOX EN NUMÉRIQUE par 320C
Source avec Zip DÉCIMAL TO HEXDECIMAL par loulou27200

 Sources en rapport avec celle ci

Source avec Zip Source avec une capture CALCULATRICE VBSCRIPT par nathansecret
Source avec Zip Source .NET (Dotnet) CALCUL DE PI par alpha5
Source avec Zip SIMPLE CALCULATRICE SCIENTIFIQUE (SOUS FORME DE LIGNE DE COM... par qbced
Source avec Zip Source avec une capture PETITE CALCULATRICE par vbskateur
Source avec Zip Source avec une capture CALCULATRICE SCIENTIFIQUE par Pingouin

Commentaires et avis

Commentaire de shivan le 08/01/2002 16:47:08

ca vous dirait pas de faire autre chose ? parske la franchement ce genre de code, on en a rien a faire...

Commentaire de shivan le 08/01/2002 16:47:56

et puis merci de mettre kan meme le .frm dans le zip... c plus pratique...

Commentaire de FScorpion le 09/01/2002 02:44:32

Relaxe  Shivan. Il a dit que c'était son premier prog puis on est pas tout rendu dans le graphisme comme toi... Chaque code à sa place...


Bon code ekinoks  mais tu devrais mettre des variables pour contenir le contenu de tes textbox afin de rendre ton code encore plus facile a comprendre et a modifier. Lache pas!


 Ajouter un commentaire


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&#233;&#233; un programme pour tracer des courbes et leurs d&#233;riv&#233;e (premi&#232;re et seconde)==&gt; <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


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,468 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales