Saturday, September 7, 2019

HOW TO CALCULATE MULTIPLICATION TWO NUMBER'S USING VB PROGRAMMING.

Hi Friends Today i will show you how you can be Calculate Multiplication in VB(Visual Basic 6.0)


  • To Make an Multiplication you need to insert Two Label Control's.
  • And another Control's need to insert is  Two Text box Control.
  • One Command button is placed to the form.
  • As Shown in Picture Arrange it.
  • Also Placed Another Label for Output or Display of Calculation of Multiplication. 
  • In this Example I used default names of Control.  
  • Also we concatenate the Strings value to show proper Output in Label Control. 

Coding of Multiplication

Private Sub cmdClick_Click()
Dim n1 As Integer, n2 As Integer, multi As Integer
n1 = Val(Text1.Text)
n2 = Val(Text2.Text)
multi = n1 * n2
lblOutput.Caption = "Multiplication is " & multi
End Sub
Code Window

Output View

Design View

No comments:

Post a Comment