Design a form using Controls array of controls





(i)  Design a calculator using Controls array of controls
Dim num1
Dim op As String
Private Sub cmddigit_Click(Index As Integer)
Text1.Text = Text1.Text &cmddigit (Index).Caption
End Sub
Private Sub cmdequal_Click()
Select Case op
Case "+"
Text1.Text = Text1.Text + num1
Case "-"
Text1.Text = Text1.Text - num1
Case "*"
Text1.Text = Text1.Text * num1
Case "/"
Text1.Text = Text1.Text / num1
End Select
End Sub
Private Sub cmdop_Click(Index As Integer)
num1 = Val(Text1.Text)
Text1.Text = ""
op = cmdop(Index).Caption
End Sub



OUTPUT:



program in c++, inline function, function, c plus plus, c plus plus programs, c++

About the Author

Unknown

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

Post a Comment

 
My Study Voice © 2015 - Designed by Templateism | Distributed By Blogger Templates