Visual Basic 6.0
Slip21
Q.1) Write a menu driven program in VB for
i. Addition
ii. Subtraction
iii. Multiplication
iv. Division [Marks 15]
Solution
Private Sub add_Click()
Text3.Text = Val(Text1.Text) + Val(Text2.Text)
End Sub
Private Sub div_Click()
Text3.Text = Val(Text1.Text) / Val(Text2.Text)
End Sub
Private Sub mul_Click()
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
End Sub
Private Sub sub_Click()
Text3.Text = Val(Text1.Text) - Val(Text2.Text)
End Sub
Output
Q.4) Write VB program to design following form.
User will select color from option button and style from check boxes that should apply
to text in text boxes. When user press on Display button that image should be displayed
in the picture box.
Solution
Tags:
VB 6.0