Visual Basic 6.0

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



BCA Pratical Solution

My name is Vivek And I from Mumbai and Complete my Graduation Bca.my Age is 23 Years.

Post a Comment

Previous Post Next Post