home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 10
/
Freelog010.iso
/
Prog
/
Algo
/
convertisseurCF.frm
< prev
next >
Wrap
Text File
|
2000-04-20
|
5KB
|
184 lines
VERSION 5.00
Begin VB.Form Form1
Caption = "Convertisseur Celsius/Farenheit"
ClientHeight = 5310
ClientLeft = 165
ClientTop = 735
ClientWidth = 7800
LinkTopic = "Form1"
ScaleHeight = 5310
ScaleWidth = 7800
StartUpPosition = 3 'Windows Default
Begin VB.TextBox fin
Height = 495
Left = 1080
TabIndex = 4
Top = 4080
Width = 1215
End
Begin VB.TextBox debut
Height = 495
Left = 1080
TabIndex = 3
Top = 3480
Width = 1215
End
Begin VB.TextBox resultat
Height = 4935
Left = 5040
MultiLine = -1 'True
TabIndex = 2
Top = 240
Width = 2655
End
Begin VB.TextBox ecart
Height = 495
Left = 1080
TabIndex = 1
Top = 1080
Width = 1215
End
Begin VB.CommandButton cmdvalid
Caption = "Valider"
Height = 495
Left = 1080
TabIndex = 0
Top = 4680
Width = 1215
End
Begin VB.Label Label7
Caption = "Indiquez les limites de vos conversions"
Height = 735
Left = 1080
TabIndex = 11
Top = 2640
Width = 1215
End
Begin VB.Label Label6
Caption = "maximum"
Height = 495
Left = 360
TabIndex = 10
Top = 4080
Width = 1215
End
Begin VB.Label Label5
Caption = "minimum"
Height = 495
Left = 360
TabIndex = 9
Top = 3480
Width = 1215
End
Begin VB.Label Label3
Caption = "a=1░ b=2░ c=3░ d=4░ e=5░"
Height = 1455
Left = 2400
TabIndex = 8
Top = 840
Width = 375
End
Begin VB.Label Label2
Caption = "Choisissez un ecart pour vos temperatures : "
Height = 1215
Left = 1080
TabIndex = 7
Top = 360
Width = 1215
End
Begin VB.Label Label1
Caption = "Farenheit"
Height = 255
Index = 1
Left = 6000
TabIndex = 6
Top = 0
Width = 855
End
Begin VB.Label Label1
Caption = "Celcius"
Height = 255
Index = 0
Left = 5040
TabIndex = 5
Top = 0
Width = 615
End
Begin VB.Menu mnquit
Caption = "Quitter"
Index = 1
End
Begin VB.Menu mnαpropos
Caption = "?"
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmdvalid_Click()
'definition de l'Θcart de tempΦrature
If ecart.Text = "a" Then
pas = 1
End If
If ecart.Text = "b" Then
pas = 2
End If
If ecart.Text = "c" Then
pas = 3
End If
If ecart.Text = "d" Then
pas = 4
End If
If ecart.Text = "e" Then
pas = 5
End If
If pas = "" Then
r = MsgBox("Vous devez saisir une lettre entre a et e")
Else
D = debut.Text
F = fin.Text
rc = Chr(13) + Chr(10)
'controle de la saisie des limites des tempΦratures
If debut.Text = "" Or fin.Text = "" Or fin.Text < debut.Text Then
r = MsgBox("Bornes numΘrique obligatoires")
Else
'contr⌠le du nombre de rΘsultats α afficher
T = fin.Text - debut.Text
I = T / pas
If I > 20 Then
r = MsgBox("modifiez vos donnΘes : Le nombre de rΘsultats est > α 20")
Else
'calcul de la conversion Celsius->Farenheit
For C = D To F Step pas
resultat.Text = resultat.Text + rc + Str(C) + " " + Str(((C * 9 / 5) + 32))
Next
End If
End If
End If
End Sub
Private Sub mnαpropos_Click()
r = MsgBox("E-Mail : PierrotRN@aol.com")
End Sub
Private Sub mnquit_Click(Index As Integer)
End
End Sub