0% found this document useful (0 votes)
3 views2 pages

VB Program

The document contains a Visual Basic program with a form that performs basic arithmetic operations (addition, subtraction, multiplication, and division) using a DLL module. The form has four buttons, each triggering a different operation based on the values entered in two text boxes. The results are displayed in a third text box after performing the calculations using functions defined in the DLL module.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

VB Program

The document contains a Visual Basic program with a form that performs basic arithmetic operations (addition, subtraction, multiplication, and division) using a DLL module. The form has four buttons, each triggering a different operation based on the values entered in two text boxes. The results are displayed in a third text box after performing the calculations using functions defined in the DLL module.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

VB PROGRAM

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
TextBox3.Text = adddll.mul(Val(TextBox1.Text), Val(TextBox2.Text))
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
TextBox3.Text = adddll.substraction(Val(TextBox1.Text),
Val(TextBox2.Text)) End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click
TextBox3.Text = adddll.add(Val(TextBox1.Text), Val(TextBox2.Text))
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button4.Click
TextBox3.Text = adddll.div(Val(TextBox1.Text), Val(TextBox2.Text))
End Sub
End Class

1.3 DLL PROGRAM

Public Module addm


Public Function add(ByVal n1 As Integer, ByVal n2 As Integer)
Return (n1 + n2)
End Function
Public Function substraction(ByVal n1 As Integer, ByVal n2 As Integer)
Return (n1 - n2)
End Function
Public Function mul(ByVal n1 As Integer, ByVal n2 As Integer)
Return (n1 * n2)
End Function
Public Function div(ByVal n1 As Integer, ByVal n2 As Integer)
Return (n1 / n2)
End Function
End Module
*/ OUTPUT :

You might also like