Label properties…………..
Label1 Caption- Number1
Label2 Caption- Number2
Label3 Caption- Sumation
Option buttons properties…………..
Option
Buttons 1 Caption- +
Option
Buttons 1 Caption- -
Option
Buttons 1 Caption- *
Option
Buttons 1 Caption- /
Command buttons properties…………..
Command buttons 1 - Caption: Clear
Command buttons 2 - Caption: Ok
Add the following code to the form code module for the Formr1
_Click event:
Program code:
Private Sub Command1_Click()
Text1 = ""
Text2 = ""
Text3 = ""
End Sub
Private Sub Command2_Click()
Dim a, b, sum As Double
a = Val(Text1)
b = Val(Text2)
If Option1 = True Then
sum = a + b
Text3 = sum
End If
If Option2 = True Then
sum = a - b
Text3 = sum
End If
If Option3 = True Then
sum = a * b
Text3 = sum
End If
If Option4 = True Then
sum = a / b
Text3 = sum
End If
End Sub
Private Sub Command3_Click()
End
End Sub
……………………………………….................
Download this Project File click hear
..............................................................
by Md. Sayemon
.............................................................................
Download this Project File click hear
..............................................................
by Md. Sayemon
.............................................................................
Sir I am keen to learn vb 6.0 language which book you will prefer?
ReplyDeletethank you
ReplyDeleteThanks alot that really helped to clarify some code errors
ReplyDelete