answersLogoWhite

0

Visual Basic .NET is the latest incarnation of Visual Basic. It is sometimes known as VB7, a misnomer on account of its incompatibility with VB6: new features and syntax within VB7 mean that a re-write, instead of a mere port, will be required to keep the upgrade treadmill going. The new facility of garbage collection allows for better memory management. There are many new object-oriented design features and higher levels of type safety.

1. To program in Visual Basic .NET, you compile straight from the command line with the .NET SDK, or use Microsoft's Visual Studio IDE or the open-source SharpDevelop ID.

2. Devising a form by hand will be a challenge if you aren't familiar with the language, so it's best to use a good form designer.

3. Start up a Visual Basic .NET IDE and make a Windows application.

4. Double-click on the form to see the code view. It will be something like:

Public Class Form1 Inherits System.Windows.Forms.Form

[Windows Form Designer generated code]

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub End Class

5. Put this code in the Form_Load Sub between “Private Sub” and “End Sub”:

MessageBox.Show("Hello World!")

6. Press F5 or go to the debug menu, then select Start to run the program. An alert box will appear containing the words “Hello World!”. Then the main window, empty, will open. Click the “X” of the title bar to exit.

7. Variables are set like this:

Dim varName As varType

...where Dim is short for “dimension”, varName is the variable name and varType is the variable type. Types include integer, char, date and string.

8. Constants are, well, constant.

Const cnstMyConstant As String = "Bing tiddle tiddle bong"

9. An array contains more than one datum.

Dim MyArray(5) As Integer

...contains five values.

10. Branching is done with If/ElseIf/Else and Select Case.

11. The are several ways to loop. The first is Do...Loop Until:

Do ' Loop code Loop Until condition

12. Next is Do ...Loop While:

Do ' Loop code Loop While condition

13. Then we have Do Until …Loop:

Do Until condition ' Loop code Loop

14. Do While...Loop:

Do While condition ' Loop code Loop

15. Next is For:

For a = 1 To 10

' Loop code Next

Visual Basic .NET is one of but a few languages written specifically for the CLR and the .NET framework. These are its most basic aspects. The actual commands in your code are just like every other version of Basic you ever used, making writing in Visual Basic .NET a very reasonable proposition.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Disadvantages of visual basicnet?

http://www.allinterview.com/showanswers/20442.html


What are attributes in visual basicnet?

Attributes in VB.Net are used to "decorate" target code elements. These are compile-time structures. _Public Function DoThis() as StringReturn "I Did It!"End Function


What is the similarities between Procedural programming and visual programming?

it is a load of rubbrish


What is visual basic short notes?

visual basic is event driven programming langauage.


What is a visual programming language and how does it differ from traditional text-based programming languages?

A visual programming language is a type of programming language that uses visual elements like blocks or diagrams to represent code and logic, making it easier for users to understand and manipulate. This differs from traditional text-based programming languages, which use written code in the form of text commands and syntax to create programs. Visual programming languages are often more user-friendly and intuitive for beginners, as they provide a more visual representation of the program's structure and flow.


What is the purpose of visual basic in project?

Programming, of course.


What programming language does VB represent?

Visual Basic


Is visual basic.net an object oriented programming?

Yes.


Thesis topic using visual basic programming language?

visual basic thesis topics


How many languages are supported by visual studio?

Visual studio 2010 supports 5 programming languages. These are Visual Basic, Visual C#, Visual C++, Visual F# and JScript.


What are example of programming software?

c,c++,b,BASIC,Python,Java,Visual C, Visual C++ and visual basic


.net is the programming language?

No. .NET is a framework, not a programming language. It is the common framework used by the C#, F# and Visual Basic programming languages.