Professional Documents
Culture Documents
Student Id : 1 8 1 3 1 2
Email : bashyalsital33@gmail.com
Session :
Assignment Type :
(i) The file menu has two menu items, Students and Exit
- Students menu item has two submenus Personal info and Academic info
- Personal Info calls the second form with size 300,200 and named “Personal Info”, this
form has controls as illustrated in the following figure.
Form2.Show()
End Sub
End Class
(ii) About menu has item named ” about this tutorial”, it shows some information such as “After
this tutorial students will be able to design menus and submenus”
Form3.show()
End Sub
End Class
2 Design the following form. Use the Contexmenutstrip tool with illustrated items to copy
numbers from list1 and paste to list2
Ans
Coding
End Sub
data = ListBox1.SelectedItem
End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ExitToolStripMenuItem.Click
Application.Exit()
End Sub
ListBox2.Items.Add(data)
End Sub
data = ListBox1.SelectedItem
ListBox1.Items.Remove(data)
End Sub
End Class
3- Provide an example of calling MESSAGE BOX with
-Two Arguments
-Four Arguments
Ans MessageBox.Show("paste
Successfully" ,"Information",MessageBoxButtons.OK,MessageBoxIcon.Information)
A procedure is a block of Visual Basic statements inside Sub, End Sub statements. Procedures do
not return values. Each procedure has a name. Inside the Main() procedure, we call our user
defined SimpleProcedure() procedure. Procedures are defined outside the Main() procedure.
Procedure name follows the Sub statement. When we call a procedure inside the Visual Basic
program, the control is given to that procedure. Statements inside the block of the procedure are
executed.
Function
A function is a block of Visual Basic statements inside Function, End Function statements.
Functions return values. There are two basic types of functions. Built-in functions and user
defined ones. The built-in functions are part of the Visual Basic language. There are various
mathematical, string or conversion functions.
5- List the advantages of using procedures in vb .net.
Ans
v. Information hiding.
Ans
Parameter - A parameter is something you have to fill in when you call a function. What you put
in it is the argument. This means a placeholder belongs to the function naming and be used in the
function body.
Argument - the argument goes into the parameter, an argument is the value of the parameter.This
means an actual value which is passed by the function calling.
End Function
Ans By Writeline.Readline