Visual Basic.NET Differences with Visual Basic 6.0

in science •  7 years ago 


 

Microsoft Visual Basic.NET is a tool to develop and create applications that move in the .NET Framework system, using the BASIC language. By using this tool, developers can create Windows Forms applications, the ASP.NET Web-based applications, and is also the command line application. This tool can be obtained separately from some other products (such as Microsoft Visual c++, Visual C # or Visual J #) or can also be obtained to integrate into Microsoft Visual Studio.NET. Visual Basic .NET language itself embraced the paradigm of object-oriented programming language that can be viewed as an evolution of the previous versions of Microsoft Visual Basic that is implemented on top of the .NET Framework. Began to dispute an invitation, given the large number of changes made by Microsoft, and this new version is not compatible with previous versions.

Here are some versions released until August 2007:

  • Visual Basic .NET 2002 (VB 7.0)
  • Visual Basic .NET 2003 (VB 7.1)
  • Visual Basic 2005 (VB 8.0)
  • Visual Basic 9.0 (Visual Basic 2008)

What are the differences between Visual Basic 6.0 and Visual Basic.NET?

Integer data type, which is owned by Visual Basic .NET, have more than twice the length of 16 bits in the 32 bit. In addition, the Long data type also also changed to double more than 32 bits in 64 bit. 16-bit integers in Visual Basic .NET called Short. Anyway, Windows Forms GUI designer in Visual Studio or Visual Basic .NET .NET has a style that is very similar to Visual Basic editor form.

If it is not changed much, another case with semantics, it changed significantly. Visual Basic .NET is a programming language that supports "object-oriented programming languages" as a whole, because it is compatible with the architecture of the Microsoft .NET Framework, which contains a combination of the Common Language Runtime and Base Class Library. Visual Basic Classic, is just an example object-based programming language, which runs on top of the architecture of the Component Object Model (COM).

This change has altered many assumptions about what to do with the performanceand ease of maintenance. Some of the functions and software library, which is in Visual Basic classic, now not found in Visual Basic. NET; Maybe there are still many whoare still in the Visual Basic. NET, but not as efficient as what .NET Framework offer. Even if it is a classic Visual Basic program can be compiled correctly, most of the classic Visual Basic program must go through some process of refactoring to adopt the new language features in its entirety. The documentation for this is available at the Microsoft web site.

An example is the difference in Visual Basic .NET Programming with Visual Basic 6.0:

1. Simple program Examples in Visual Basic .NET language that is used to calculate the amount of the payment of the product m_item with fruit m_price per item priceplus 5% sales tax.

Dim m_item, m_price, tax, total As double
m_item = double.Parse(textBox1.Text)
m_price = double.Parse(textBox2.Text)
tax = 0.05
total = m_item * m_price * (1 + tax)
label5.Text = total.ToString()
MessageBox.Show("Well Done.") 

2. This is another example of a Visual Basic program that uses object CheckBox andComboBox to count the number of credit courses taken by students (each course = 3 credits):

Dim total As Integer
 total = 0 ' awal dari jumlah kredit total
 If (CheckBox1.Checked = True) Then 'boleh memilih semua checkbox
            total += 3
        End If
        If (CheckBox2.Checked = True) Then
            total = total + 3
        End If
        If (CheckBox3.Checked = True) Then
            total = total + 3
        End If
 If (ComboBox1.SelectedIndex = 0) Then 'hanya bisa memilih satu
            total = total + 3
        ElseIf (ComboBox1.SelectedIndex = 1) Then
            total = total + 3
        ElseIf (ComboBox1.SelectedIndex = 2) Then
            total = total + 3 
        End If
 Label3.Text = CStr(total) ' hasil kredit total yang diambil

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

I learned Visual Basic and the .NET framework before knowing about VB6. It was a challenge to go and interpret code sometimes on VB6 when being used to VB.NET.

Have you used Visual Studio 2016? I'm interested in knowing how their VB6 compatibility libraries are used I haven't had the chance to tinker with it.

I have never used Visual Studio 2016, I just use Visual Studio 2012, Do you think is easy to use VB6 or more easily using Visual Basic.Net?