Dim op As String
Option Explicit
Dim i As Integer
Dim exp1 As Double
Dim exp2 As Double
Dim Result As Double
Dim count1 As Integer
Dim scitype As String
Private X As Double
Dim mem As Variant
Private Sub command1_Click(Index As Integer)
If count1 = 0 Then
Text1.Text = " "
MsgBox ("Calculator is not on please press the on button")
End If
If count1 = 1 Then
Text1.Text = " "
count1 = count1 + 1
End If
If count1 > 1 Then
Text1.Text = Text1.Text & command1(Index).Caption
End If
End Sub
Private Sub Command2_Click()
Text1.Text = -Val(Text1.Text)
End Sub
Private Sub Command3_Click()
If count1 > 0 Then
exp2 = Val(Text1.Text)
Select Case (op)
Case "+"
        Result = exp1 + exp2
        Text1.Text = Result
        count1 = 0
Case "-"
        Result = exp1 - exp2
        Text1.Text = Result
        count1 = 0
Case "*"
        Result = exp1 * exp2
        Text1.Text = Result
        count1 = 0
Case "/"
        Result = exp1 / exp2
        Text1.Text = Result
        count1 = 0
Case "%"
        Result = (exp1 / 100) * exp2
        Text1.Text = Result
        count1 = 0
End Select
End If
End Sub
Private Sub Command4_Click(Index As Integer)
Result = exp1
exp1 = Result + Val(Text1.Text)
Text1.Text = " "
op = Command4(Index).Caption
End Sub
Private Sub Command5_Click()
Result = 0
exp1 = 0
exp2 = 0
Text1.Text = " "
count1 = 1
End Sub
Private Sub Command6_Click()
count1 = 0
Text1.Text = ""
End Sub
Private Sub Command7_Click()
Result = 0
exp1 = 0
exp2 = 0
count1 = 1
Text1.Text = "0"
End Sub
Private Sub Command8_Click(Index As Integer)
scitype = Command8(Index).Caption
Select Case (scitype)
Case "sin"
           Text1.Text = (Text1.Text * 3.14) / 180
           Text1.Text = Math.Sin(Val(Text1.Text))
           count1 = 0
Case "cos"
           Text1.Text = (Text1.Text * 3.14) / 180
           Text1.Text = Math.Cos(Val(Text1.Text))
           count1 = 0
Case "tan"
           Text1.Text = (Text1.Text * 3.14) / 180
           Text1.Text = Math.Tan(Val(Text1.Text))
           count1 = 0
Case "log"
           Text1.Text = Math.Log(Val(Text1.Text))
           count1 = 0
End Select
End Sub
skip to main  |
      skip to sidebar
Di rumah Bu Novi
 
Kamis, 23 September 2010
Halaman
Text Widgets
You can replace this text by going to "Layout" and then "Page Elements" section. Edit " About "
Rexona
Di rumah Bu Novi
Links
- About Anime
 - Amq 5th Umi Yara
 - Amq 6th Agustin
 - Amq 6th Babeh Jiden
 - Amq 6th Bangkeung
 - Amq 6th Bu Tay
 - Amq 6th Denungnung
 - Amq 6th Fadel
 - Amq 6th Faiq Ndut
 - Amq 6th Iil Silvi
 - Amq 6th Ma Ding
 - Amq 6th Ma Wil
 - Amq 6th Maman
 - Amq 6th Mufqi
 - Amq 6th Neng Sori
 - Amq 6th Om Dudayy
 - Amq 6th Rismae
 - Amq 6th Verly
 - Amq 7th Raka Adam
 - Amq 8th Isna Nana
 - Amq 8th Neng Lola (Shofiyatunnisa)
 - Informasi Gempa
 - Matematika
 - MtsN Sukamanah Indra Permana
 
Our Partner
Another Templates
MY SHOUT BOX
Pages
Diberdayakan oleh Blogger.



0 komentar:
Posting Komentar