Difference Between


(1) Sub Procedure and Function Procedure

Sub Procedure Function Procedure
Sub Procedure does not return any value to the point from which it is called.
Function Procedure can return single value to the point from which it is called.
[Scope] Sub ProcedureName ([Argument List])
Group of Related statements
End Sub
[Scope] Function ProcedureName ([Argument List]) [As Return Type]
Group of Related statements
[Return Statement]
End Function

     

(2) ByVal and ByRef

ByVal ByRef
It works with copies of original variable.
It works with original variable.
The limitation of passing arguments by value is that you can not modify the contents of the original variables in the sub procedure or function procedure.
The advantage of passing arguments byref is that you can modify the contents of the original variable in the sub procedure or function procedure.
By default arguments are passed by value. No need to explicitly specify it.
You have to explicitly specify Byref while defining sub procedure or function procedure.

(3) MDI and SDI

MDI SDI
MDI stands for Multiple Document Interface.
SDI stands for Single Document Interface.
In MDI you can work with more then one form in the same workspace.  
In SDI you can not work with more then one form in the same workspace. 
In MDI application there is a relationship between MDI Form and SDI Forms which is known as parent child relationship.
In SDI application there is no relationship between SDI forms. They all are independent of each other.
It is best suited for the application that contains more then one forms. Example: Microsoft Word
It is best suited for the application that contains only single form. Example: Microsoft Note Pad

(4) Label and TextBox

Label TextBox
Label control is used to display some text on the form.
Text box control is widely used for entering some input values at run time.
User can not edit content of the label at runtime.
User can edit content of the TextBox at runtime.

(5) CheckBox and Radio Button

CheckBox RadioButton
Check box control is used to represents list of options to the user from which user can select none or any number of options.
RadioButton Control is used to represent list of options to the user from which user can select only one option.
Example: Select Hobbies
Example: Select Gender

Widget is loading comments...

Download Projects


Download Programs