Click here to Skip to main content
15,903,362 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: group by years Pin
sorin_zan23-Aug-11 19:38
sorin_zan23-Aug-11 19:38 
GeneralRe: group by years Pin
Shahan Ayyub24-Aug-11 5:59
Shahan Ayyub24-Aug-11 5:59 
GeneralRe: group by years Pin
sorin_zan24-Aug-11 7:17
sorin_zan24-Aug-11 7:17 
QuestionRe: group by years Pin
Shahan Ayyub24-Aug-11 21:52
Shahan Ayyub24-Aug-11 21:52 
AnswerRe: group by years Pin
sorin_zan25-Aug-11 0:26
sorin_zan25-Aug-11 0:26 
GeneralRe: group by years Pin
sorin_zan23-Aug-11 20:09
sorin_zan23-Aug-11 20:09 
GeneralRe: group by years Pin
sorin_zan23-Aug-11 21:10
sorin_zan23-Aug-11 21:10 
Questionplease help me how to fix this program this is a calculator in vb6.0 Pin
VBBeginerGSM22-Aug-11 3:26
VBBeginerGSM22-Aug-11 3:26 
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")
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"
Text1.Text = Math.Log(Val(Text1.Text))
count1 = 0
End Select
End Sub
Private Sub Command9_Click()
mem = Text1.Text
End Sub
AnswerRe: please help me how to fix this program this is a calculator in vb6.0 Pin
Simon_Whale22-Aug-11 3:27
Simon_Whale22-Aug-11 3:27 
AnswerRe: please help me how to fix this program this is a calculator in vb6.0 [modified] Pin
VBBeginerGSM22-Aug-11 3:42
VBBeginerGSM22-Aug-11 3:42 
GeneralRe: please help me how to fix this program this is a calculator in vb6.0 Pin
Smithers-Jones22-Aug-11 6:46
Smithers-Jones22-Aug-11 6:46 
GeneralRe: please help me how to fix this program this is a calculator in vb6.0 Pin
Аslam Iqbal23-Aug-11 8:09
professionalАslam Iqbal23-Aug-11 8:09 
GeneralRe: please help me how to fix this program this is a calculator in vb6.0 Pin
VBBeginerGSM23-Aug-11 22:09
VBBeginerGSM23-Aug-11 22:09 
GeneralRe: please help me how to fix this program this is a calculator in vb6.0 Pin
Аslam Iqbal23-Aug-11 23:34
professionalАslam Iqbal23-Aug-11 23:34 
AnswerRe: please help me how to fix this program this is a calculator in vb6.0 Pin
riced22-Aug-11 4:29
riced22-Aug-11 4:29 
GeneralRe: please help me how to fix this program this is a calculator in vb6.0 Pin
VBBeginerGSM22-Aug-11 4:37
VBBeginerGSM22-Aug-11 4:37 
GeneralRe: please help me how to fix this program this is a calculator in vb6.0 Pin
Simon_Whale22-Aug-11 4:42
Simon_Whale22-Aug-11 4:42 
GeneralRe: please help me how to fix this program this is a calculator in vb6.0 Pin
riced22-Aug-11 5:01
riced22-Aug-11 5:01 
GeneralRe: please help me how to fix this program this is a calculator in vb6.0 Pin
VBBeginerGSM23-Aug-11 2:53
VBBeginerGSM23-Aug-11 2:53 
GeneralRe: please help me how to fix this program this is a calculator in vb6.0 Pin
DaveAuld23-Aug-11 3:30
professionalDaveAuld23-Aug-11 3:30 
GeneralRe: please help me how to fix this program this is a calculator in vb6.0 Pin
VBBeginerGSM23-Aug-11 3:39
VBBeginerGSM23-Aug-11 3:39 
AnswerRe: please help me how to fix this program this is a calculator in vb6.0 Pin
Dalek Dave23-Aug-11 11:23
professionalDalek Dave23-Aug-11 11:23 
QuestionVB6 MSH FLEXGRID Selection Problem after empty recordset Pin
FahdSanaullah21-Aug-11 20:28
FahdSanaullah21-Aug-11 20:28 
Questiona question for typed dataset Pin
dcode2521-Aug-11 5:50
dcode2521-Aug-11 5:50 
AnswerRe: a question for typed dataset Pin
Simon_Whale21-Aug-11 23:09
Simon_Whale21-Aug-11 23:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.