3

What is VB runtime? How is this related to VB.NET?

Datte

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
dattebayo
  • 2,012
  • 4
  • 30
  • 40

3 Answers3

5

The VB runtime is/was a separate library containing various functions to use in you VB applications. This runtime could be installed (copied) in you Windows directory, where it could be used by every VB application that was written in the same version (VB5 runtime is not compatible with VB6 runtime).

This allowed compiled VB applications to be very small, because large chunks of shared code were in that runtime.

.NET builds on a similar principle, although it is so much larger, you can hardly compare it. But the .NET framework also contains a lot of basic functionality that can be used by all .NET applications.

But then again, so is the Windows API to regular Win32/Win64 programs. ;-)

GolezTrol
  • 114,394
  • 18
  • 182
  • 210
  • 2
    Some omissions/errors. The main VB6 runtime **is [part of Windows](http://msdn.microsoft.com/en-us/vbasic/ms788708)**, and doesn't need to be installed. It became part of Windows long ago, and is present on all versions from Windows 2000 through to Windows 7/2008. The runtime (rather than the IDE) is also still fully supported, so I think we can use the present tense rather than *was, allowed, were* etc :) – MarkJ Mar 08 '11 at 11:55
  • 2
    Yes, ofcourse it is supported. It is Microsoft! They dropped support on IE6 just yesterday. ;-) I was more describing the process of VB development back in the old days when you had to deploy the runtime yourself, and people even still had a vague memory of the has-been existence of VB for DOS. ;-) But thanks for the addition. I didn't know the runtime is included nowadays. – GolezTrol Mar 08 '11 at 14:51
1

To my knowledge, the Visual Basic Runtime is not related to Visual Basic .NET but to prior versions of Visual Basic.

This is explained here:

  1. Visual Basic Runtimes;
  2. Visual Basic (Wikipedia).
Will Marcouiller
  • 23,773
  • 22
  • 96
  • 162
1

Complementing @GolezTrol's answer:

Most of the features of the VB6 runtime are available in the Visual Basic Runtime Library in the .Net Framework (Microsoft.VisualBasic namespace).

http://msdn.microsoft.com/en-us/library/c157t28f(v=VS.100).aspx

Visual Basic .NET enables you to code using VB 6 legacy syntax and keywords. For example, we can use CInt, Mid, InStr etc. The implementation of the compatibility layer is at the Microsoft.VisualBasic.dll library. [ http://www.codeproject.com/KB/vb/novbruntimeref.aspx ]

It is automatically added as a reference in all VB.Net projects, and you can add manually in C# (et al) projects.

tiago2014
  • 3,392
  • 1
  • 21
  • 28
  • 1
    +1 See also discussion of whether the VB6 runtime functions [should be used](http://stackoverflow.com/questions/241822/vb-runtime-functions-in-vb-net-for-vb6-programmers) and the discussions under [is the Microsoft.VisualBasic namespace true .Net code?](http://stackoverflow.com/questions/226517/is-the-microsoft-visualbasic-namespace-true-net-code) – MarkJ Mar 08 '11 at 11:59