Vb.net and .Net Framework

SHIVANGICHAURASIYA 82 views 17 slides Sep 06, 2021
Slide 1
Slide 1 of 17
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17

About This Presentation

VB.Net, .Net Framework, Visual Studio(Forms and console base application) programs
Shivangi Chaurasiya From Thakur Polytechnic
Studying in Diploma in 3rd Year (2020-2021)


Slide Content

Information about .Net Framework and VB.Net - Shivangi Chaurasiya

. Net Framework The .Net framework is a revolutionary platform that helps you to write the following types of applications − Windows applications Web applications Web services It is a virtual machine that provide a common platform to run an application that was built using the different language such as C#, VB.NET, Visual Basic, etc. It is also used to create a form based, console-based, mobile and web-based application or services that are available in Microsoft environment. Furthermore, the .NET framework is a pure object oriented, that similar to the Java language. But it is not a platform independent as the Java. So, its application runs only to the windows platform.

CLR (common language runtime) It is an important part of a .NET framework that works like a virtual component of the .NET Framework to executes the different languages program like  c# , Visual Basic, etc. A CLR also helps to convert a source code into the byte code, and this byte code is known as CIL (Common Intermediate Language) or MSIL (Microsoft Intermediate Language). After converting into a byte code, a CLR uses a JIT compiler at run time that helps to convert a CIL or MSIL code into the machine or native code. CTS (Common Type System) It specifies a standard that represent what type of data and value can be defined and managed in computer memory at runtime. A CTS ensures that programming data defined in various languages should beinteract with each other to share information. For example, in C# we define data type as int , while in VB.NET we define integer as a data type.

CLS (Common language Specification) It is a subset of common type system (CTS) that defines a set of rules and regulations which should be followed by every language that comes under the .net framework. In other words, a CLS language should be cross-language integration or interoperability . BCL (Base Class Library ) The base class library has a rich collection of libraries features and functions that help to implement many programming languages in the .NET Framework, such as C #, F #, Visual C ++, and more . FCL (Framework Class Library) It provides the various system functionality in the .NET Framework, that includes classes, interfaces and data types, etc. to create multiple functions and different types of application such as desktop, web, mobile application, etc. In other words, it can be defined as, it provides a base on which various applications, controls and components are built in .NET Framework .

Visual Basic .NET ( VB.Net ) Visual Basic, originally called Visual Basic .NET (VB.NET), is a multi-paradigm, object-oriented programming language, implemented on .NET Framework. Microsoft launched VB.NET in 2002 as the successor to its original Visual Basic language. VB.NET is implemented by Microsoft's .NET framework. Therefore, it has full access to all the libraries in the .Net Framework. It's also possible to run VB.NET programs on Mono, the open- sou The following reasons make VB.Net a widely used professional language − Modern, general purpose. Object oriented. Component oriented. Easy to learn. Structured language. It produces efficient programs. It can be compiled on a variety of computer platforms. Part of .Net Framework

Advantages of VB.NET Using the Visual Studio IDE, you can develop a small program that works faster, with a large desktop and web application. The .NET Framework is a software framework that has a large collection of libraries, which helps in developing more robust applications. It uses drop and drag elements to create web forms in .NET applications. However, a Visual Basic .NET allows to connect one application to another application that created in the same language to run on the .NET framework. A VB.NET can automatically structure your code. The Visual Basic .NET language is also used to transfer data between different layers of the .NET architecture such that data is passed as simple text strings.

Disadvantages of VB.NET The VB.NET programming language is unable to handle pointers directly. Because in this language, it requires a lot of programming, and it is not easy to manage every address by a pointer. Furthermore, additional coding takes extra CPU cycles, that increases the processing time. It shows the slowness of the VB.NET application. The VB.NET programming is easy to learn, that increases a large competition between the programmers to apply the same employment or project in VB.NET. Thus, it reduces a secure job in the programming field as a VB.NET developer. It uses an Intermediate Language (IL) compilation that can be easily decompiled (reverse engineered), but there is nothing that can prevent an application from disintegrating . It contains a large collection of libraries for the JIT compiler that helps to interpret an application. These large libraries hold a vast space in our system that takes more computing time .

VB.Net Programs on Linux or Mac OS Although the . NET Framework runs on the Windows operating system, there are some alternative versions that work on other operating systems. Mono is an open-source version of the .NET Framework which includes a Visual Basic compiler and runs on several operating systems, including various flavors of Linux and Mac OS. The most recent version is VB 2012. The stated purpose of Mono is not only to be able to run Microsoft .NET applications cross-platform, but also to bring better development tools to Linux developers. Mono can be run on many operating systems including Android, BSD, iOS, Linux, OS X, Windows, Solaris and UNIX.

VB.NET C# It is pronounced as Visual Basic .NET, which is an updated feature and version of Classic Visual Basic 6.0. It is pronounced as "C SHARP" language, that belongs to the C family. It is also used to develop various applications running on the .NET Framework. It is used to create a variety of application that runs on the.NET Framework Both languages are functionally equal. Both languages are functionally equal. It is a case insensitive language. For example, "Hello" and "hello" are the same. It is a case sensitive language. For example," Hello" and "hello" are different. VB.NET supports structured and unstructured error handling. It supports only structured error handling. Events are automatically bound. Events are not possible in C#. Declaration and definition are different in both Declaration and definition are different in both. Whereas, it uses Simple English for defining the structureDim x As Integer Public x As Integer = 10 It uses a simple programming structure as C, Java, Python, C++, etc.int x; int x = 10; Each statement does not end with a semicolon. Each statement is terminated with a semicolon (;)

Module Module1         Sub Main()            Console.WriteLine ("Hello, Welcome to the world of VB.NET")            Console.WriteLine ("Press any key to continue...")            Console.ReadKey ()       End Sub   End Module   Modules are a division of code, which can contain any kind of object, like constants or variables, functions or methods, or classes This line defines a subroutine called "Main". "Main" is the entry point, where the program begins execution. This line performs the actual task of writing the output.

Simple Basic program Module Module1         Sub Main()            Console.WriteLine ("Hello, Welcome to the world of VB.NET")            Console.WriteLine ("Press any key to continue...")            Console.ReadKey ()       End  Sub    End Module  OUTPUT

VB.NET Form Controls A Form is used in VB.NET to create a form-based or window-based application. Using the form, we can build a attractive user interface. It is like a container for holding different control that allows the user to interact with an application. The controls are an object in a form such as buttons, Textboxes, Textarea , labels, etc. to perform some action. However, we can add any control to the runtime by creating an instance of it . Visual Basic is often used in conjunction with the Windows Forms GUI library to make desktop apps for Windows. Programming for Windows Forms with Visual Basic involves dragging and dropping controls on a form using a GUI designer and writing corresponding code for each control

VB.NET Form Properties Events Description Activated An activated event is found when the user or program activates the form. Click A click event is active when the form is clicked. Closed A closed event is found before closing the form. Closing It exists when a form is closing. DoubleClick The DoubleClick event is activated when a user double clicks on the form. DragDrop A DragDrop event is activated when a drag and drop operation is performed. MouseDown A MouseDown event is activated when the mouse pointer is on the form, and the mouse button is pressed. GotFocus A GotFocus event is activated when the form control receives a focus. HelpButtonClicked It is activated when a user clicked on the help button. KeyDown A KeyDown event is activated when a key is pressed while focussing on the form. The following are the most important list of events related to a form.

KeyUp A KeyUp event is activated when a key is released while focusing on the form. Load The load event is used to load a form before it is first displayed. LostFocus It is activated when the form loses focus. MouseEnter A MouseEnter event is activated when the mouse pointer enters the form. MouseHover A MouseHover event is activated when the mouse pointer put on the form. MouseLeave A MouseLeave event is activated when the mouse pointer leaves the form surface. Shown It is activated whenever the form is displayed for the first time. Scroll A Scroll event is activated when a form is scrolled through a user or code. Resize A Resize event is activated when a form is resized. Move A Move event is activated when a form is moved.

For creating a Windows Forms application in  VB.NET , we need to follow the following steps in Microsoft  Visual Studio . GoTo File Menu. Click on New Project. Click on Windows Forms App or Application And finally, click on the 'Create' button to create your project, and then, it displays the following window form with a name Form1 .

Visual Studio Visual Studio is an  Integrated Development Environment(IDE)  developed by Microsoft to develop GUI(Graphical User Interface), console, Web applications, web apps, mobile apps, cloud, and web services, etc. With the help of this IDE, you can create managed code as well as native code. It uses the various platforms of Microsoft software development software like Windows store, Microsoft Silverlight, and Windows API, etc. It is not a language-specific IDE as you can use this to write code in C#, C++, VB ( Visual Basic), Python, JavaScript, and many more languages. It provides support for 36 different programming languages.

. Solution Explorer: It shows the files on which the user is currently working. Code Editor: Where the user will write code. Output Window: Here the Visual Studio shows the outputs, compiler warnings, error messages and debugging information. Properties: It will give additional information and context about the selected parts of the current project.