in my proff. this my project in 1st sem sir help me!
VBBeginerGSM
Posts
-
please help me how to fix this program this is a calculator in vb6.0 -
please help me how to fix this program this is a calculator in vb6.0sir I add u in FB! please acept it!
-
please help me how to fix this program this is a calculator in vb6.0sir ido'nt know were commandbottons i put the code please teach me!
-
please help me how to fix this program this is a calculator in vb6.0sir the code is ok but i do'nt know how to fix it in command buttons huh !
-
please help me how to fix this program this is a calculator in vb6.0SIR i don't know how to fix it in command botton please help me u have facebook? please add me michaelgsm22@yahoo.com I w8 your response
modified on Monday, August 22, 2011 10:23 AM
-
please help me how to fix this program this is a calculator in vb6.0Dim 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") 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 Command10_Click() Text1.Text = mem 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 UpdateLog() Trim (Form1.Text1.Text) 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 "sqrt" Text1.Text = Math.Sqr(Val(Text1.Text)) count1 = 0 Case "abs" Text1.Text = Math.Abs(Val(Text1.Text)) count1 = 0 Case "rnd" Text1.Text = Math.Rnd(Val(Text1.Text)) count1 = 0 Case "log" Text1.Text = Math.Log(Val(Text1.Text)) count1 = 0 Case "Atn"