-
VB.NET
is a major component of Microsoft Visual Studio .NET suite.
-
VB.NET
is improved version of VB 6 with many additional features.
-
Being
part of VS.net suite, VB.NET can access a common .NET library
and support all CLS features.
-
VB.NET
is a full object oriented language which support inheritance, overloading,
interfaces, shared members and constructors.
-
.Net
Framework is a primary element for software development in VS.Net
suite.
-
.Net
Framework includes loads of code required for application
development.
-
.Net
Framework is divided into CLS (Common language Runtime) and Base
class Library.
-
CLS
provides many service required for execution of application developed in .Net
platform.
-
Base
Class library has many pre-developed classes that can be used by developer.
-Base Class library is organized into namespaces.
-
Assembly
is primary unit of .Net application.
-
Assembly
contain manifest which describes the assembly and its modules.
-
Modules
contain source code for the application.
-
An
assembly may exist in the form of DLL or .Exe.
-
An
assembly is stored as an intermediate language (IL) file.
Before running, the assembly goes through security check against the local
system. After having cleared from security check, it gets loaded into memory
and compiled into native code by JIT compiler.
-
A
variable in .Net can be of two types.
-
Value
type and reference type.
-
Value
type contains data of the type whereas reference type contains pointer to an
instance of an object of that type.
-
Value
type is created at the time of declaration whereas reference type must be
instantiated after declaration to create object.
-
If
we assign a reference type variable to another reference type variable, only
reference to the object is copied, not value and both the variable will refer
to the same object.
-
Use
of Import or Using keyword will allow to reference to member of a namespace.
Classes and structures contain data and methods. Methods perform data
manipulation and provide behavior to classes and structures.
-
Method
can return values. The method which returns value is called Function and which
doesn’t return value called Subs.
-
Method
can have parameters that are passed by value by default. We can pass parameters
by reference with the ref keyword in C#.net and byref in VB.Net.
-
The
constructor is like any method of the class, but gets created before the object
is available for use. This is the first method to get called on the
instantiation of the class.
-
The
Destructor is called just before an object is destroyed. It is used for code
clean-up when object is no longer in use. Developer has no control when a
destructor is called, since it gets called by CLR.
-
.Net
Framework provides utility like Garbage collection.
-
The
Garbage Collection is responsible for automatic memory
reclamation when object is more in use.
-
The
Garbage Collection is a low-priority thread that runs in the
background of the application.
-
The
GC gets high priority when memory resource is scarce.
-
We
should remember that GC is called by CLR, so developer has no control when GC
is called. So, we shouldn’t rely on the code placed inside destructors or
finalizers. If we need to reclaim recourses urgently, we can use dispose ()
method which can be called explicitly.
-
The
GC also get ride of circular references, commonly known as memory leak.
-
Form
is the basic unit of user interface. We can add form in the application at
design time or run time. We can create one general parent form and can inherit
forms from parent form using visual inheritance. While using visual
inheritance, we ensures uniform look to all the forms of the application.
-
Forms
have various properties that control their appearance, namely text, font,
cursor, backgroundImage, Opacity, backcolor and forecolor.
-
Forms
have various intrinsic methods like Form.show, form.showdialog, form.activate,
form.hide and form.close.
-
Form’s
intrinsic methods causes change in the visual interface and various events get
raised like load, activated/deactivate, visiblechanged, closing, closed.
-
We
can also create our own event handler which will get called when associated
event is raised.
-
Each
control on the form can have order of navigation which can be set using
tabindex property of the control.
-
A
control can contain other controls. For example panel, groupbox and tabpage.
-
We
can resize and change position of the form and controls on it, manually. We can
make use of docking and anchor properties for automatic resizing and
positioning of the controls as we change size or position of the form.
-
Dock
property ensures the controls to an edge of the form on change in size or
repositioning of the form.
-
Anchor
property ensures if controls should be fixed, floats, or change size in
response to the change in size of form.
-
We
can create control at run-time by declaring control and instantiating of the
type. We can then add instantiated control to the control collection of the
form.
-
Each
control’s property on the form can be enhanced by using Extender Provider
component. These properties mostly used to provide information to the user like
help or tool tip.
-
Menu
is the best navigation way in the application. We can create MainMenu control
that allows rapid creating of menu for the application. Developer can apply
separator bars, access keys and shortcut keys.
-
Context
menu allows us to get access to various commands on the specific situation.
-
Developer
can create this kind of menu same as MainMenu but at run-time.
-
We
can control the menu dynamically at run-time. We can enable and disable the
menu items, make menu items invisible etc. We can change the structure of menu
dynamically at run-time by creating new menu with the CloneMenu method.
-
We
can have form-level validation as well as field level validations.
-
We
can validate each field as data entered using field-level validation.
-
We
can validate all fields of the form at one shot using form-level validation.
-
The
textbox control contains properties like MaxLength, PasswordChar, ReadOnly,
Multiline. These properties are used to restrict user to enter unwanted data in
the field. Developer can tap keyboard events of the control like Keydown, KeyUp
and Keypress.
-
Developer
can validate character input by using static methods of char structure like
char.IsDigit, CharIsletter, Char.Islower, Char.IsUpper etc.
-
The
CauseValidation property of the control allows us to disable the event to
occur. The event occurs only when CauseValidation property of the control is
set to true.
-
We
can set CancelEventArgs.Cancel property to true in the event handler to
restrict focus from moving away from the control.
-
The
ErrorProvoider component of the control can be used at run time for displaying
informative error message to the user.