0% found this document useful (0 votes)
49 views4 pages

Robotic Process Automation

This document describes an experiment to design a form using Visual Basic in Visual Studio to perform arithmetic operations. It includes sections on the aim, relevant course outcomes, theory on Visual Studio and its features, how to use message boxes and input boxes, arithmetic operators, the code written, and resources required. The code allows the user to enter two numbers, select an arithmetic operation (addition, subtraction, multiplication, division), and display the result in a message box.

Uploaded by

sammy
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)
49 views4 pages

Robotic Process Automation

This document describes an experiment to design a form using Visual Basic in Visual Studio to perform arithmetic operations. It includes sections on the aim, relevant course outcomes, theory on Visual Studio and its features, how to use message boxes and input boxes, arithmetic operators, the code written, and resources required. The code allows the user to enter two numbers, select an arithmetic operation (addition, subtraction, multiplication, division), and display the result in a message box.

Uploaded by

sammy
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/ 4

EXPERIMENT NO.

Aim: To design a form to perform

Relevant Course Outcome:


● Use visual basic to design simple application

Practical Course Outcome:

Theory:
Visual Studio empowers you to complete the entire development cycle in one place. For
example, you can edit, debug, test, version control, and deploy to the cloud. With the
diversity of features and languages in Visual Studio, you can grow from writing your first
piece of code to developing in multiple project types.
Message box:
A message box is special type of Visual Basic window in which you can display a message to
the user. You can display message, an optional icon, a title bar caption, and command buttons
in a message box.
Input box:
VBA InputBox is used to prompt the user to enter the values. This message box is used to
displaying a message and waits for the user action performed by pressing the button. A text
can be return in the text box by using the InputBox function if the user clicks on the OK or
Enter button.
Arithmetic operations:
Arithmetic operators are used to perform many of the familiar arithmetic operations that
involve the calculation of numeric values represented by literals, variables, other expressions,
function and property calls, and constants.
• You can add two values in an expression together with the + Operator, or subtract one
from another with the - Operator (Visual Basic), as the following example
demonstrates.
• Negation also uses the - Operator (Visual Basic), but with only one operand, as the
following example demonstrates.
• Multiplication and division use the * Operator and / Operator (Visual Basic),
respectively, as the following example demonstrates.
Code:
namespace experimentno9
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{
int j;
j = Int32.Parse(textBox1.Text) + Int32.Parse(textBox2.Text);
textBox3.Text = j.ToString();
MessageBox.Show(textBox3.Text);

private void Form1_Load(object sender, EventArgs e)


{

private void button2_Click(object sender, EventArgs e)


{
int k;
k = Int32.Parse(textBox1.Text) - Int32.Parse(textBox2.Text);
textBox3.Text = k.ToString();
MessageBox.Show(textBox3.Text);
}

private void button3_Click(object sender, EventArgs e)


{
int l;
l = Int32.Parse(textBox1.Text) * Int32.Parse(textBox2.Text);
textBox3.Text = l.ToString();
MessageBox.Show(textBox3.Text);
}

private void button4_Click(object sender, EventArgs e)


{
int m;
m = Int32.Parse(textBox1.Text) / Int32.Parse(textBox2.Text);
textBox3.Text = m.ToString();
MessageBox.Show(textBox3.Text);
}
}
}

Resources Required:
● Internet
● Desktop/Laptop
● Chrome/Internet explorer
● Notepad
● Microsoft Visual Studio

Output:
Conclusion:
From this experiment how to create a page in visual studio. Also learnt the code used for the
coding of that.

Marks obtained Dated signature of


teacher
Process Related Product Related Total (25)
(15) (10)

You might also like