Sunteți pe pagina 1din 11

Public Class frm_calcul

Inherits System.Windows.Forms.Form

Dim a As Double
Dim b As Double
Dim c As Double
Dim d As Double

Dim bla As Boolean

Dim bls As Boolean

Dim blm As Boolean

Dim bld As Boolean

Dim blv As Boolean

#Region " Code g�n�r� par le Concepteur Windows Form "

Public Sub New()


MyBase.New()

'Cet appel est requis par le Concepteur Windows Form.


InitializeComponent()

'Ajoutez une initialisation quelconque apr�s l'appel InitializeComponent()

End Sub

'La m�thode substitu�e Dispose du formulaire pour nettoyer la liste des


composants.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Requis par le Concepteur Windows Form


Private components As System.ComponentModel.IContainer

'REMARQUE�: la proc�dure suivante est requise par le Concepteur Windows Form


'Elle peut �tre modifi�e en utilisant le Concepteur Windows Form.
'Ne la modifiez pas en utilisant l'�diteur de code.
Friend WithEvents txt_aff As System.Windows.Forms.TextBox
Friend WithEvents btn_7 As System.Windows.Forms.Button
Friend WithEvents btn_8 As System.Windows.Forms.Button
Friend WithEvents btn_9 As System.Windows.Forms.Button
Friend WithEvents btn_4 As System.Windows.Forms.Button
Friend WithEvents btn_5 As System.Windows.Forms.Button
Friend WithEvents btn_1 As System.Windows.Forms.Button
Friend WithEvents btn_2 As System.Windows.Forms.Button
Friend WithEvents btn_3 As System.Windows.Forms.Button
Friend WithEvents btn_egale As System.Windows.Forms.Button
Friend WithEvents btn_ad As System.Windows.Forms.Button
Friend WithEvents btn_sous As System.Windows.Forms.Button
Friend WithEvents btn_p As System.Windows.Forms.Button
Friend WithEvents btn_0 As System.Windows.Forms.Button
Friend WithEvents btn_extr As System.Windows.Forms.Button
Friend WithEvents btn_ml As System.Windows.Forms.Button
Friend WithEvents btn_annu As System.Windows.Forms.Button
Friend WithEvents btn_6 As System.Windows.Forms.Button
Friend WithEvents btn_sqt As System.Windows.Forms.Button
Friend WithEvents btn_log As System.Windows.Forms.Button
Friend WithEvents btn_pow As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New
System.ComponentModel.ComponentResourceManager(GetType(frm_calcul))
Me.txt_aff = New System.Windows.Forms.TextBox
Me.btn_7 = New System.Windows.Forms.Button
Me.btn_8 = New System.Windows.Forms.Button
Me.btn_9 = New System.Windows.Forms.Button
Me.btn_4 = New System.Windows.Forms.Button
Me.btn_5 = New System.Windows.Forms.Button
Me.btn_6 = New System.Windows.Forms.Button
Me.btn_1 = New System.Windows.Forms.Button
Me.btn_2 = New System.Windows.Forms.Button
Me.btn_3 = New System.Windows.Forms.Button
Me.btn_egale = New System.Windows.Forms.Button
Me.btn_ad = New System.Windows.Forms.Button
Me.btn_sous = New System.Windows.Forms.Button
Me.btn_p = New System.Windows.Forms.Button
Me.btn_0 = New System.Windows.Forms.Button
Me.btn_extr = New System.Windows.Forms.Button
Me.btn_ml = New System.Windows.Forms.Button
Me.btn_annu = New System.Windows.Forms.Button
Me.btn_sqt = New System.Windows.Forms.Button
Me.btn_log = New System.Windows.Forms.Button
Me.btn_pow = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'txt_aff
'
Me.txt_aff.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_aff.Location = New System.Drawing.Point(8, 8)
Me.txt_aff.Name = "txt_aff"
Me.txt_aff.Size = New System.Drawing.Size(272, 20)
Me.txt_aff.TabIndex = 0
Me.txt_aff.WordWrap = False
'
'btn_7
'
Me.btn_7.BackColor = System.Drawing.Color.DodgerBlue
Me.btn_7.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_7.Font = New System.Drawing.Font("Times New Roman", 9.0!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_7.Location = New System.Drawing.Point(26, 48)
Me.btn_7.Name = "btn_7"
Me.btn_7.Size = New System.Drawing.Size(48, 34)
Me.btn_7.TabIndex = 1
Me.btn_7.Text = "7"
Me.btn_7.UseVisualStyleBackColor = False
'
'btn_8
'
Me.btn_8.BackColor = System.Drawing.Color.DodgerBlue
Me.btn_8.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_8.Font = New System.Drawing.Font("Times New Roman", 9.0!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_8.Location = New System.Drawing.Point(90, 48)
Me.btn_8.Name = "btn_8"
Me.btn_8.Size = New System.Drawing.Size(48, 34)
Me.btn_8.TabIndex = 2
Me.btn_8.Text = "8"
Me.btn_8.UseVisualStyleBackColor = False
'
'btn_9
'
Me.btn_9.BackColor = System.Drawing.Color.DodgerBlue
Me.btn_9.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_9.Font = New System.Drawing.Font("Times New Roman", 9.0!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_9.Location = New System.Drawing.Point(154, 48)
Me.btn_9.Name = "btn_9"
Me.btn_9.Size = New System.Drawing.Size(48, 34)
Me.btn_9.TabIndex = 3
Me.btn_9.Text = "9"
Me.btn_9.UseVisualStyleBackColor = False
'
'btn_4
'
Me.btn_4.BackColor = System.Drawing.Color.DodgerBlue
Me.btn_4.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_4.Font = New System.Drawing.Font("Times New Roman", 9.0!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_4.Location = New System.Drawing.Point(26, 88)
Me.btn_4.Name = "btn_4"
Me.btn_4.Size = New System.Drawing.Size(48, 34)
Me.btn_4.TabIndex = 4
Me.btn_4.Text = "4"
Me.btn_4.UseVisualStyleBackColor = False
'
'btn_5
'
Me.btn_5.BackColor = System.Drawing.Color.DodgerBlue
Me.btn_5.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_5.Font = New System.Drawing.Font("Times New Roman", 9.0!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_5.Location = New System.Drawing.Point(90, 88)
Me.btn_5.Name = "btn_5"
Me.btn_5.Size = New System.Drawing.Size(48, 34)
Me.btn_5.TabIndex = 5
Me.btn_5.Text = "5"
Me.btn_5.UseVisualStyleBackColor = False
'
'btn_6
'
Me.btn_6.BackColor = System.Drawing.Color.DodgerBlue
Me.btn_6.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_6.Font = New System.Drawing.Font("Times New Roman", 9.0!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_6.Location = New System.Drawing.Point(154, 88)
Me.btn_6.Name = "btn_6"
Me.btn_6.Size = New System.Drawing.Size(48, 34)
Me.btn_6.TabIndex = 6
Me.btn_6.Text = "6"
Me.btn_6.UseVisualStyleBackColor = False
'
'btn_1
'
Me.btn_1.BackColor = System.Drawing.Color.DodgerBlue
Me.btn_1.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_1.Font = New System.Drawing.Font("Times New Roman", 9.0!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_1.Location = New System.Drawing.Point(26, 128)
Me.btn_1.Name = "btn_1"
Me.btn_1.Size = New System.Drawing.Size(48, 34)
Me.btn_1.TabIndex = 7
Me.btn_1.Text = "1"
Me.btn_1.UseVisualStyleBackColor = False
'
'btn_2
'
Me.btn_2.BackColor = System.Drawing.Color.DodgerBlue
Me.btn_2.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_2.Font = New System.Drawing.Font("Times New Roman", 9.0!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_2.Location = New System.Drawing.Point(90, 128)
Me.btn_2.Name = "btn_2"
Me.btn_2.Size = New System.Drawing.Size(48, 34)
Me.btn_2.TabIndex = 8
Me.btn_2.Text = "2"
Me.btn_2.UseVisualStyleBackColor = False
'
'btn_3
'
Me.btn_3.BackColor = System.Drawing.Color.DodgerBlue
Me.btn_3.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_3.Font = New System.Drawing.Font("Times New Roman", 9.0!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_3.Location = New System.Drawing.Point(154, 128)
Me.btn_3.Name = "btn_3"
Me.btn_3.Size = New System.Drawing.Size(48, 34)
Me.btn_3.TabIndex = 9
Me.btn_3.Text = "3"
Me.btn_3.UseVisualStyleBackColor = False
'
'btn_egale
'
Me.btn_egale.BackColor = System.Drawing.Color.DodgerBlue
Me.btn_egale.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_egale.Font = New System.Drawing.Font("Times New Roman", 15.75!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_egale.Location = New System.Drawing.Point(26, 168)
Me.btn_egale.Name = "btn_egale"
Me.btn_egale.Size = New System.Drawing.Size(48, 34)
Me.btn_egale.TabIndex = 10
Me.btn_egale.Text = "="
Me.btn_egale.UseVisualStyleBackColor = False
'
'btn_ad
'
Me.btn_ad.BackColor = System.Drawing.Color.GhostWhite
Me.btn_ad.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_ad.Font = New System.Drawing.Font("Times New Roman", 14.25!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_ad.Location = New System.Drawing.Point(218, 48)
Me.btn_ad.Name = "btn_ad"
Me.btn_ad.Size = New System.Drawing.Size(48, 24)
Me.btn_ad.TabIndex = 11
Me.btn_ad.Text = "+"
Me.btn_ad.UseVisualStyleBackColor = False
'
'btn_sous
'
Me.btn_sous.BackColor = System.Drawing.Color.GhostWhite
Me.btn_sous.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_sous.Font = New System.Drawing.Font("Times New Roman", 20.25!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_sous.Location = New System.Drawing.Point(218, 88)
Me.btn_sous.Name = "btn_sous"
Me.btn_sous.Size = New System.Drawing.Size(48, 24)
Me.btn_sous.TabIndex = 12
Me.btn_sous.Text = "-"
Me.btn_sous.UseVisualStyleBackColor = False
'
'btn_p
'
Me.btn_p.BackColor = System.Drawing.Color.DodgerBlue
Me.btn_p.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_p.Font = New System.Drawing.Font("Times New Roman", 18.0!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_p.Location = New System.Drawing.Point(154, 168)
Me.btn_p.Name = "btn_p"
Me.btn_p.Size = New System.Drawing.Size(48, 34)
Me.btn_p.TabIndex = 13
Me.btn_p.Text = "."
Me.btn_p.TextAlign = System.Drawing.ContentAlignment.TopCenter
Me.btn_p.UseVisualStyleBackColor = False
'
'btn_0
'
Me.btn_0.BackColor = System.Drawing.Color.DodgerBlue
Me.btn_0.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_0.Font = New System.Drawing.Font("Times New Roman", 8.25!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_0.Location = New System.Drawing.Point(90, 168)
Me.btn_0.Name = "btn_0"
Me.btn_0.Size = New System.Drawing.Size(48, 34)
Me.btn_0.TabIndex = 14
Me.btn_0.Text = "0"
Me.btn_0.UseVisualStyleBackColor = False
'
'btn_extr
'
Me.btn_extr.BackColor = System.Drawing.Color.GhostWhite
Me.btn_extr.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_extr.Font = New System.Drawing.Font("Times New Roman", 15.75!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_extr.Location = New System.Drawing.Point(218, 168)
Me.btn_extr.Name = "btn_extr"
Me.btn_extr.Size = New System.Drawing.Size(48, 24)
Me.btn_extr.TabIndex = 15
Me.btn_extr.Text = "/"
Me.btn_extr.UseVisualStyleBackColor = False
'
'btn_ml
'
Me.btn_ml.BackColor = System.Drawing.Color.GhostWhite
Me.btn_ml.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_ml.Font = New System.Drawing.Font("Times New Roman", 15.75!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_ml.Location = New System.Drawing.Point(218, 128)
Me.btn_ml.Name = "btn_ml"
Me.btn_ml.Size = New System.Drawing.Size(48, 24)
Me.btn_ml.TabIndex = 16
Me.btn_ml.Text = "*"
Me.btn_ml.TextAlign = System.Drawing.ContentAlignment.TopCenter
Me.btn_ml.UseVisualStyleBackColor = False
'
'btn_annu
'
Me.btn_annu.BackColor = System.Drawing.Color.LightSteelBlue
Me.btn_annu.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_annu.Font = New System.Drawing.Font("Times New Roman", 14.25!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_annu.Location = New System.Drawing.Point(218, 208)
Me.btn_annu.Name = "btn_annu"
Me.btn_annu.Size = New System.Drawing.Size(48, 26)
Me.btn_annu.TabIndex = 17
Me.btn_annu.Text = "c"
Me.btn_annu.UseVisualStyleBackColor = False
'
'btn_sqt
'
Me.btn_sqt.BackColor = System.Drawing.Color.GhostWhite
Me.btn_sqt.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_sqt.Font = New System.Drawing.Font("Times New Roman", 12.0!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_sqt.Location = New System.Drawing.Point(26, 208)
Me.btn_sqt.Name = "btn_sqt"
Me.btn_sqt.Size = New System.Drawing.Size(48, 24)
Me.btn_sqt.TabIndex = 18
Me.btn_sqt.Text = "sqrt"
Me.btn_sqt.UseVisualStyleBackColor = False
'
'btn_log
'
Me.btn_log.BackColor = System.Drawing.Color.GhostWhite
Me.btn_log.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_log.Font = New System.Drawing.Font("Times New Roman", 12.0!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_log.Location = New System.Drawing.Point(154, 208)
Me.btn_log.Name = "btn_log"
Me.btn_log.Size = New System.Drawing.Size(48, 24)
Me.btn_log.TabIndex = 19
Me.btn_log.Text = "log"
Me.btn_log.UseVisualStyleBackColor = False
'
'btn_pow
'
Me.btn_pow.BackColor = System.Drawing.Color.GhostWhite
Me.btn_pow.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.btn_pow.Font = New System.Drawing.Font("Times New Roman", 12.0!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_pow.Location = New System.Drawing.Point(90, 208)
Me.btn_pow.Name = "btn_pow"
Me.btn_pow.Size = New System.Drawing.Size(48, 24)
Me.btn_pow.TabIndex = 20
Me.btn_pow.Text = "pow"
Me.btn_pow.UseVisualStyleBackColor = False
'
'frm_calcul
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 246)
Me.Controls.Add(Me.btn_pow)
Me.Controls.Add(Me.btn_log)
Me.Controls.Add(Me.btn_sqt)
Me.Controls.Add(Me.btn_annu)
Me.Controls.Add(Me.btn_ml)
Me.Controls.Add(Me.btn_extr)
Me.Controls.Add(Me.btn_0)
Me.Controls.Add(Me.btn_p)
Me.Controls.Add(Me.btn_sous)
Me.Controls.Add(Me.btn_ad)
Me.Controls.Add(Me.btn_egale)
Me.Controls.Add(Me.btn_3)
Me.Controls.Add(Me.btn_2)
Me.Controls.Add(Me.btn_1)
Me.Controls.Add(Me.btn_6)
Me.Controls.Add(Me.btn_5)
Me.Controls.Add(Me.btn_4)
Me.Controls.Add(Me.btn_9)
Me.Controls.Add(Me.btn_8)
Me.Controls.Add(Me.btn_7)
Me.Controls.Add(Me.txt_aff)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.MaximizeBox = False
Me.Name = "frm_calcul"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Calculatrice"
Me.ResumeLayout(False)
Me.PerformLayout()

End Sub

#End Region

Private Sub btn_annu_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_annu.Click
txt_aff.Text = ""

a = 0
b = 0
c = 0
d = 0
txt_aff.Focus()
End Sub

Private Sub btn_1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_1.Click

Call ajouter("1")

End Sub

Private Sub btn_2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_2.Click

Call ajouter("2")
End Sub

Private Sub btn_3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_3.Click

Call ajouter("3")
End Sub

Private Sub btn_4_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_4.Click

Call ajouter("4")
End Sub

Private Sub btn_5_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_5.Click

Call ajouter("5")
End Sub

Private Sub btn_6_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_6.Click

Call ajouter("6")
End Sub

Private Sub btn_7_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_7.Click

Call ajouter("7")
End Sub

Private Sub btn_8_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_8.Click

Call ajouter("8")

End Sub
Private Sub btn_9_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btn_9.Click
Call ajouter("9")
End Sub

Private Sub btn_0_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_0.Click
Call ajouter("0")
End Sub

Private Sub btn_ad_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_ad.Click

If verification(txt_aff.Text) = False Then


MsgBox("erreur", MsgBoxStyle.Exclamation, "Erreur de saisie")
txt_aff.Text = ""
Exit Sub
Else
a = txt_aff.Text
txt_aff.Text = ""
bla = True
End If

End Sub
Sub ajouter(ByVal caracteres As String)
txt_aff.Text = txt_aff.Text + caracteres
End Sub

Private Sub btn_egale_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_egale.Click
Dim x As Double
Dim y As Double
Dim z As Double
Dim w As Double
If bla = True Then
x = Val(a + txt_aff.Text)
txt_aff.Text = x
bla = False

End If
If bls = True Then
y = Val(b - txt_aff.Text)
txt_aff.Text = y
bls = False

End If
If blm = True Then
z = Val(c * txt_aff.Text)
txt_aff.Text = z
blm = False

End If
If bld = True Then
w = Val(d / txt_aff.Text)
txt_aff.Text = w
bld = False
End If

End Sub

Private Sub btn_sous_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_sous.Click
b = txt_aff.Text
txt_aff.Text = ""
bls = True
End Sub

Private Sub btn_ml_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_ml.Click
c = txt_aff.Text
txt_aff.Text = ""
blm = True
End Sub

Private Sub btn_extr_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_extr.Click
d = txt_aff.Text
txt_aff.Text = ""
bld = True
End Sub

Private Sub btn_p_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_p.Click
Call ajouter(",")

End Sub

Private Sub btn_sqt_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_sqt.Click
txt_aff.Text = System.Math.Sqrt(txt_aff.Text)
End Sub

Private Sub btn_pow_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_pow.Click
Dim po As Double
po = txt_aff.Text
txt_aff.Text = po * po
End Sub

Private Sub btn_log_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btn_log.Click
txt_aff.Text = System.Math.Log(txt_aff.Text)
End Sub
Function verification(ByVal entree As String) As Boolean
Dim seulement_ceci As String
Dim i As Integer
Dim j As Integer
Dim compt As Integer
Dim test As Boolean
seulement_ceci = "0123456789[]()-+*%/."
For i = 1 To entree.Length
For j = 1 To seulement_ceci.Length
If Mid(entree, i, 1) = Mid(seulement_ceci, j, 1) Then
compt = i

End If
Next j
Next i
If compt <> entree.Length Then
test = False
Else
test = True

End If
Return test
End Function
End Class

S-ar putea să vă placă și