Jump to content

Visual Basic (classic): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
remove copyright content copied from https://dokumen.pub/code-nation-personal-computing-and-the-learn-to-program-movement-in-america-1st-edition-9781450377584-9781450377577-9781450377560-9781450377553.html
 
Line 1: Line 1:
{{Short description|Microsoft's programming language based on BASIC and COM}}
'''Visual Basic''' ('''VB''') is an [[event driven programming language]] and associated [[integrated development environment|development environment]], created by [[Microsoft]]. It is derived heavily from [[BASIC programming language|BASIC]]. VB enables [[Rapid Application Development]] (RAD) of [[graphical user interface]] (GUI) applications; allows easy access to [[database]]s using [[Data Access Objects|DAO]], [[RDO]], or [[ADO]]; and makes it easy to create [[ActiveX]] controls. A moderately skilled programmer can quickly put together a simple business application using [[software component|components]] provided with Visual Basic.
{{About|the Visual Basic language that shipped with Microsoft Visual Studio pre-.NET|the current Visual Basic language, based on .NET|Visual Basic (.NET)}}
{{Distinguish|VBScript}}


{{Infobox programming language
== Derivative languages==
| name = Visual Basic
| logo = File:Visual Basic 6.0 logo.png
| logo_size = 210px
| screenshot = Visual Basic 6.0 on Windows XP.png
| screenshot caption = Visual Basic 6.0 [[Integrated development environment|IDE]] running on [[Windows XP]]
| paradigm = [[Object-based language|Object-based]] and [[event-driven programming|event-driven]]
| released = {{Start date and age|1991|5}}
| designer =
| developer = [[Microsoft]]
| latest_release_version = 6.0
| latest_release_date = {{Start date and age|1998}}
| typing = [[Static type|Static]], [[Strongly-typed programming language|strong]]
| implementations = [[Microsoft Visual Studio]]
| dialects =
| influenced_by = [[BASIC]], [[Microsoft BASIC]], [[QBasic]]
| influenced = [[Visual Basic .NET]], [[Visual Basic for Applications]], [[Windows Forms]], [[Gambas]], [[Xojo]], [[Basic4ppc]], [[Basic4android]], and [[NS Basic]]
| operating_system = [[Microsoft Windows]] and [[MS-DOS]]
| license =
| website = {{URL|https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/visual-basic-6.0-documentation}}
| discontinued = yes
}}


'''Visual Basic''' (VB), sometimes referred to as '''Classic Visual Basic''',<ref>{{Cite web|title=The Classic Visual Basic Programming Language|url=https://www.tiobe.com/tiobe-index/classic-visual-basic/|access-date=2023-02-07|website=TIOBE|language=en-US}}</ref><ref>{{Cite web|title=Classic VB|url=https://visualstudiomagazine.com/articles/list/classic-vb.aspx|access-date=2024-08-29|website=Visual Studio Magazine|language=en-US}}</ref> is a [[third-generation programming language|third-generation]] [[programming language]] based on [[BASIC]], as well as an associated [[integrated development environment]] (IDE). Visual Basic was developed by [[Microsoft]] for [[Windows]], and is known for supporting [[rapid application development]] (RAD) of [[graphical user interface]] (GUI) applications, [[event-driven programming]], and both consumption and development of
Many derivative languages also exist:
[[Component-based software engineering|components]] via the [[Component Object Model]] (COM) technology.
* [[VBScript programming language|VBScript]] is the default language for [[Active Server Pages]] and can be used in windows scripting and client-side [[web page]] scripting.
* [[Visual Basic .NET]] is a backwards incompatible upgrade of Visual Basic 6.0, and is part of Microsoft's [[Microsoft .NET|.NET]] platform.
* [[Visual Basic for Applications]] (VBA) provides the ability to create macros, and is built into every product in the [[Microsoft Office]] family, and also in several third-party products like [[Visio]] (now owned by Microsoft) and [[WordPerfect_Office|WordPerfect Office 2002]].


VB was first released in 1991. The final release was version 6 (VB6) in 1998. On April 8, 2008, Microsoft stopped supporting the VB6 IDE, relegating it to [[legacy system|legacy]] status. The Microsoft VB team still maintains compatibility for VB6 applications through its "It Just Works" program on supported Windows operating systems.<ref>{{cite web | url=https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/visual-basic-6-support-policy |title=Support Statement for Visual Basic 6.0 on Windows (updated with Windows 10 version 1709 support information) |publisher=Microsoft |access-date=2015-10-15}}</ref>
== Language features ==


[[Visual Basic .NET]] (VB.NET) is based on Classic Visual Basic. Because VB.NET was later rebranded back to Visual Basic, the name is ambiguous: it can refer to either Classic Visual Basic or to the .NET version.
Visual Basic was designed to be usable by all [[programmer]]s, whether novice or expert. Forms are created using [[drag and drop]] techniques. A tools palette is used to place controls (e.g., text boxes, buttons, etc.) on the form (window). Controls have [[attribute]]s and [[event handler]]s associated with them. Default values are provided when the control is created, but may be changed by the programmer. Many attribute values can be modified during run time based on user actions or changes in the environment, providing a dynamic application. For example, code can be inserted into the form resize event handler to reposition a control so that it remains centered on the form, expands to fill up the form, etc. By inserting code into the event handler for a keypress in a text box, the program can automatically translate the case of the text being entered, or even prevent certain characters from being inserted.


Just as BASIC was originally intended to be easy to learn, Microsoft intended the same for VB.<ref>{{Cite book
A Visual Basic application can consist of one or more windows, or a single window that contains child windows, as provided by the [[operating system]]. Dialog boxes with less functionality (e.g., no maximize/minimize control) can be used to provide pop-up capabilities. Controls provide the basic functionality of the application, while programmers can insert additional logic within the appropriate event handlers. For example, a drop-down combination box will automatically display its list and allow the user to select any element. An event handler is called when an item is selected, which can then execute additional code created by the programmer to perform some action based on which element was selected.
|title = A tester's guide to .NET programming
|publisher = [[Apress]]
|year = 2006
|first1 = Randal
|last1 = Root
|first2 = Mary
|last2 = Romero Sweeney
|isbn = 978-1-59059-600-5
|page = 3
|quote = You can choose a language based on how easy it is to learn. For beginners, Visual Basic is a good choice. [~snip] A big advantage of Visual Basic is that it is a popular language since it is easy to learn.
}}</ref><ref>{{Cite book
|title = An executive's guide to information technology
|url = https://archive.org/details/executivesguidet00plan
|url-access = limited
|publisher = [[Cambridge University Press]]
|year = 2007
|isbn = 978-0-521-85336-1
|first1 = Robert T.
|last1 = Plant
|first2 = Stephen
|last2 = Murrell
|page = [https://archive.org/details/executivesguidet00plan/page/n354 343]
|quote = Summary of positive issues: Visual Basic is easy to learn and widely available.
}}</ref>


Development of a VB application is exclusively supported via the VB [[integrated development environment]] (IDE), an application in the contemporary Visual Studio suite of tools. Unlike modern versions of [[Visual Studio]], which support many languages including VB (.NET), the VB IDE only supports VB.
Alternatively, a Visual Basic component can have no user interface, but be available to other programs, providing objects that implement functionality. This allows for [[server-side]] processing or an add-in model.


In 2014, some [[software developer]]s still preferred Visual Basic 6.0 over its successor, [[Visual Basic .NET]].<ref name="ISpliter" /> Visual Basic 6.0 was selected as the most dreaded programming language by respondents of [[Stack Overflow]]'s annual developer survey in 2016, 2017, and 2018.<ref>{{Cite web|last=|first=|date=2016|title=Stack Overflow Developer Survey 2016|url=https://insights.stackoverflow.com/survey/2016#technology-most-loved-dreaded-and-wanted|archive-url=|archive-date=|access-date=2020-12-18|website=[[Stack Overflow]]}}</ref><ref>{{Cite web|last=|first=|date=2017|title=Stack Overflow Developer Survey 2017|url=https://insights.stackoverflow.com/survey/2017#most-loved-dreaded-and-wanted|archive-url=|archive-date=|access-date=2020-12-18|website=[[Stack Overflow]]}}</ref><ref>{{Cite web|last=|first=|date=2018|title=Stack Overflow Developer Survey 2018|url=https://insights.stackoverflow.com/survey/2018#most-loved-dreaded-and-wanted|archive-url=|archive-date=|access-date=2020-12-18|website=[[Stack Overflow]]}}</ref>
The language is [[garbage collection (computer science)|garbage collected]], has a large library of utility objects, and has basic [[Object-oriented_programming|object oriented support]]. Unlike many other programming languages, Visual Basic is not case sensitive. String comparisons can be performed with case sensitivity, if so desired.


==Overview==
Visual Basic spawned the first commercially viable reusable component market. There are thousands of [[3rd party components]] available today from hundreds of vendors. Visual Basic makes it easy to build, deploy, use, and reuse components, however it is not as easy to use forms created for one application with another, due to the global nature of the language.


As was the intention of older [[BASIC]] variants, VB was intended to have a low [[learning curve]]. Further, the IDE was intended to promote productivity; even for complex [[Graphical user interface|GUI]] applications. Programming involves ''visually'' arranging [[GUI widget|component]]s or [[GUI widget|control]]s on a [[Form (programming)|form]], specifying attributes and actions for those components, and writing [[Source code|code]] that directs behavior. Since components have default attributes and actions, a programmer can develop a simple program without writing much code.
== Controversy ==


Programs built with earlier versions suffered performance problems, but faster computers and native code compilation made this less of an issue.
Visual Basic is a controversial language; many programmers have strong feelings regarding the quality of Visual Basic. It was designed to be a simple language, and many features found in languages like [[C Plus Plus|C++]] and [[Java programming language|Java]] are not found in Visual Basic. In the interest of convenience and rapid development, some features like [[Compiler|compile]] time [[type-checking]] and variable declaration can be turned off. This leads to programmers praising Visual Basic for how simple it is to use, but also leads to frustration when programmers realize they need to use a feature that has been removed.
<!-- 32-bit and single-threaded -->


Since a VB program is compiled as a native code [[executable]] instead of interpreted as old BASIC variants, it runs relatively fast and requires relatively little storage space. But, [[#Timeline of Visual Basic (VB1 to VB6)|from version 5 on]], it requires relatively large library files to be loaded at runtime; about 1&nbsp;MB. Core runtime libraries are included by default in [[Windows 2000]] and later, but extended runtime components require extra installation consideration. Earlier versions of [[Microsoft Windows]] (95/98/NT), require the runtime libraries to be distributed with the executable.
Many critics of Visual Basic explain that the simple nature of Visual Basic is harmful in the long run. First, it is often used to teach programming due to its simplicity, but learning to program in Visual Basic does not introduce the programmer to many fundamental programming techniques and constructs. This often leads to unintelligible code and workarounds. Second, allowing the programmer to turn off many of the checks and warnings that a compiler implements may lead to difficulties in finding bugs. Of course, experienced programmers working in VB leave such checks on.
[[File:Form vide VB.JPG|thumb|left|An empty form in Visual Basic 6]]


Forms are created using [[drag-and-drop]] techniques. A tool is used to place controls (e.g., text boxes, buttons, etc.) on the form (window). Controls have [[Attribute (computing)|attribute]]s and [[event handler]]s associated with them. Default values are provided when the control is created, but may be changed by the programmer. Many attribute values can be modified during run time based on user actions or changes in the environment, providing a dynamic application. For example, code can be inserted into the form resize event handler to reposition a control so that it remains centered on the form, expands to fill up the form, etc. By inserting code into the event handler for a keypress in a text box, the program can automatically translate the case of the text being entered, or even prevent certain characters from being inserted.
Much criticism of Visual Basic is simply criticism of [[BASIC_programming_language|BASIC]]. A famous formulation by [[Edsger Dijkstra]] was, "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration [http://www.cs.virginia.edu/~evans/cs655/readings/ewd498.html]." (Dijkstra was no less scathing about [[FORTRAN]], [[PL/1]], [[COBOL]] and [[APL]].)


Development in the IDE is organized as a ''project'' which can be configured to output as a [[computer program|program]] ([[EXE]]), a [[dynamic-link library]] (DLL) or an [[ActiveX|ActiveX control library]] (OCX) which is a specialized DLL.
But many of the proponents of Visual Basic explain that the simple nature of Visual Basic is its main strength, allowing very rapid application development to experienced Visual Basic coders and a very slight learning curve for programmers coming from other languages. Additionally, Visual Basic applications can easily be integrated with [[database]]s, a common requirement.


Controls provide the graphical functionality of a GUI application, and programmers attach code to event handlers to perform actions. For example, a drop-down control displays a list of items. When the user selects an item, an event handler is automatically called that executes the code that the programmer attached to the handler.
Visual Basic is also a conglomerate of language features and syntax, with less consistency, but more tolerance, than many modern programming languages. Many language features like GoSub, On Error, and declaring the type of a variable by the last character in the name (i.e. str$) are legacies from Visual Basic's BASIC roots, and are included for backward-compatibility. Other characteristics include variable and subroutine names that are not case sensitive, and an underscore "_" must be used for a statement to span multiple lines. Some Visual Basic programmers perceive these as strengths needed to avoid case-sensitive compiler errors, and line-termination characters some languages require, usually semicolons.


For a DLL, the VB code generally provides no user interface, and instead provides COM objects to other programs. This allows for capabilities such as [[server-side]] processing or an add-in module.
The language continues to attract much praise and criticism, and it continues to cater to a large base of users and developers.


Via the COM technology, unused memory is recovered for reuse using [[reference counting]]; recovering when the count reaches zero. VB reduces the count when a variable goes out of scope or when assigned to <code>Nothing</code>. This design prevents [[memory leak]]s that plague some, older languages such as C & C++. It differs significantly from the more modern approach of [[Garbage collection (computer science)|garbage collection]].
=== Programming constructs not present in Visual Basic ===


VB provides a large library of utility objects, and it provides basic support for [[object-oriented programming]].
* [[Object-oriented programming]]. Visual Basic has simple support for object-oriented programming but many common object-oriented features (such as [[inheritance(computer science)]]) are not present in versions prior to [[Visual Basic .NET]] ([[2002]]).
* [[Thread (computer science)|Threading]] support.
* [[Exception handling]] with Try-Catch-Finally prior to Visual Basic .NET. Errors are handled by an "<code>On Error Goto</code> ''line''" statement.
* Built-in support for some bitwise arithmetic such as [[Bitwise operation#Bit_Shift|bit shifting]].
* [[Typecasting (programming)|Typecasting]]. VB instead has explicit conversion functions.
* Equivalents to [[C programming language|C]]-style [[pointer|pointers]] are very limited.
* Visual Basic is limited to signed [[Integer (computer science)|integers]] of 8 to 32 bits (8 to 64 bits in Visual Basic .NET and later), whereas many other languages provides built-in unsigned integers.
* 32-bit and 64-bit Visual Basic is internally limited to [[UTF-16]] strings, although it provides conversion functions to other formats (16-bit Visual Basic is internally limited to [[ASCII]] strings).
* Visual Basic doesn't allow ''constant'' variables to contain an array. Therefore extra processing is required to emulate this.


Unlike many other programming languages, VB code is not [[case-sensitive]] {{endash}} though the IDE transforms [[Keyword (computer programming)|keywords]] into a standard case and variable names to match the case used elsewhere in the project. Of note, [[String (computer science)|string]] comparison is case sensitive by default.
While Visual Basic does not naturally support these features, programmers can, sometimes with difficulty, construct work-arounds to give their programs similar functionality if they desire.


The VB compiler is shared with other Visual Studio suite languages, C and C++. Nevertheless, by default the restrictions in the IDE do not allow creation of some targets (Windows model DLLs) and threading models, but over the years, developers have bypassed these restrictions.
=== Behaviors present in Visual Basic ===


==Features==
VB has the following uncommon traits:
[[File:Visual Basic function.PNG|thumb|A function using the If, Then, Else and Dim statements]]


Visual Basic has notable features and characteristics that are in some cases different than other BASIC variants or from other common languages:
* Variable [[array]] base. The first element in an array can either be referenced as the 0th or 1st element (controlled by the Option Base statement), leading to possible confusion when reading Visual Basic code. This lower bound is not limited to 0 or 1, because it can also be set by declaration. In this way, both the lower and upper bounds are programmable. In more subscript-limited languages, the lower bound of the array is not variable. This uncommon trait dosn't exist in [[Visual Basic .NET]] and [[VBScript]].
* Ability to run the application without performing a full compile or making an [[executable]], allowing for edit-and-continue changes.
* Relatively strong integration with the [[Windows operating system]].
* [[significance arithmetic|Banker's rounding]] as the default behaviour when converting real numbers to integers.


* Enables [[rapid application development]] (RAD) of [[graphical user interface]] (GUI) applications, access to [[database]]s using [[Jet Data Access Objects]], [[Remote Data Objects]], or [[ActiveX Data Object]] (ADO), and creation of [[ActiveX]] controls and COM objects.
=== Visual Basic and VB.NET ===


* Supports [[event-driven programming]]
Visual Basic .NET, VB.NET, is a somewhat backwards-incompatible upgrade of Visual Basic to Microsoft's [[Microsoft .NET|.NET]] platform. Practically all of the above criticisms have been addressed with many of the missing features added. VB.NET has support for threading, advanced object oriented code, Try-Catch-Finally blocks, and zero-based arrays. Many new features (mainly from the .NET [[framework]]) have also appeared, like remoting, [[web service]]s, 64-bit integers and [[ADO.NET]].


* Allows use of the [[Windows API]] via an external function declaration technology
Many of the original critics of Visual Basic now praise VB.NET for providing a "complete" language, while a few supporters of Visual Basic claim VB.NET has made the language too complicated and too hard to use for simple application development. Another criticism of VB.NET is the incompatibility and lack of similarity in syntax. VB.NET provides a wizard to help upgrade code, but many features are not converted properly. The wizard produces a list of places in the code where the upgrade is incomplete, but large projects have many thousands of such places requiring lots of programmer time to complete the upgrade. In particular the ''Variant'' data type, which was the default data type is no longer supported. Therefore, programs that did not declare all variables and/or those that depended on the Variant data type cannot be converted without significant effort.


* Supports sharing and reuse via the COM [[component-based software engineering|component]] technology. A [[programmer]] can create an application using components provided by VB, developed internally or from third parties. Over time the development community produced and shared many components.<ref name="ISpliter">{{cite web|last=ISpliter|title=Visual Basic 6.0: A giant more powerful than ever|date=14 January 2014|url=http://www.codeproject.com/Articles/710181/Visual-Basic-6-0-A-giant-more-powerful-than-ever|publisher=CodeProject.com|access-date=3 April 2014}}</ref><ref>{{cite web|last=violent|first=ken|title=vkControls : 16 GRAPHICALS usercontrols ! NEVER SEEN before!|url=http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=68734&lngWId=1|publisher=PSC|access-date=5 April 2014}}</ref><ref>{{cite web|last=Krool|title=CommonControls (Replacement of the MS common controls)|url=http://www.vbforums.com/showthread.php?698563-CommonControls-(Replacement-of-the-MS%20-common-controls)|publisher=VBForums|access-date=5 April 2014}}</ref><ref>{{cite web|last=PSC|title=Visual Basic 6.0 third party components for modern standards (a review)|url=http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=75311&lngWId=1|publisher=Planet Source Code|access-date=4 April 2014}}</ref><ref>{{cite web|last=Jeff|first=Martin|title=Visual Basic 6 Renewed to Run on Windows 8|url=http://www.infoq.com/news/2012/02/vb6_supported_on_win8|publisher=INFOQ|access-date=5 April 2014}}</ref>
Some believe VB.NET support will diminish, with [[C Sharp programming language|C#]] becoming the preferred language for .NET programming. This is despite the fact both compile to the same .NET [[Common Intermediate Language]], with the programming language choice merely a matter of syntax preference.


* Unlike older BASIC variants, instead of requiring line numbers to support branching, code is grouped into named blocks delimited by ''Sub...End Sub'' or ''Function...End Function''. VB retains line number support<ref>{{Cite web|url=https://www.brainbell.com/tutors/Visual_Basic/Tip_2_Use_line_numbers_in_your_source_code.htm|title = Tip 2: Use line numbers in your source code. : Visual Basic}}</ref>
=== Other criticisms of Visual Basic ===


* Code statements have no terminating character other than a line ending (carriage return/line feed), and versions since 3 allow for multi-line statements for concatenation of strings or explicitly using the underscore character (_) at the end of a line<ref>Microsoft Visual Basic Programmer's Guide Version 3.0 - Microsoft Corporation 1993</ref><ref>{{Cite web|title=Visual Studio 2003 Retired Technical documentation|url=https://www.microsoft.com/en-us/download/details.aspx?id=55979|access-date=2023-02-07|website=Microsoft Download Center|language=en-us}}</ref>
* Not being very [[portability|portable]]. It is only available for Microsoft Windows, although a [[MS-DOS|DOS]] version was marketed at one time. However, much of the code can run in [[Microsoft Office]] applications using VBA, including those applications running on [[Mac OS]].
* Being too big. [[Visual Studio]] is distributed on several [[CD-ROM|discs]], and executables require a 1.4 MB [[runtime library]]. However, while it is indeed distributed on several disks, Visual Studio is in essence a suite of applications, including Visual Basic, [[Visual C Plus Plus|Visual C++]], [[C Sharp|Visual C#]], [[J Sharp|Visual J#]], [[Microsoft WebDev]] and [[Microsoft SQL Server]], among others. In reality, Visual Basic itself occupies only a large portion of one of the distribution discs.
* Having bugs in the [[Integrated Developer Environment|IDE]]. This is fixed to some extent by a series of service packs from [[Microsoft]].


* A code comment is denoted by a single apostrophe (') character, like: {{code|' This is a comment}}
== Evolution of Visual Basic ==


* Looping statement blocks begin and end with keywords: ''Do...Loop, While...End While, For...Next'' <ref>{{Cite web|author = Kathleen Dollard|display-authors=etal|title=Loop Structures - Visual Basic|url=https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/control-flow/loop-structures|access-date=December 4, 2017|website=learn.microsoft.com|language=en-us}}</ref>
VB 1.0 was introduced in [[1991]]. The approach for connecting the programming language to the graphical user interface is derived from a system called ''Tripod'', originally developed by [[Alan Cooper]], which was further developed by Cooper and his associates under contract to Microsoft.


* Chained variable assignment is not allowed; for example <code>A = B = C</code> does not result in the values of A, B and C being equal. The [[Boolean data type|Boolean]] result of "is B equal to C?" is stored in A
During the [[Dot-com|Internet boom]] programmers were in great demand and many new programmers entered the field. These new programmers helped make VBScript one of the most common languages for web-based scripting on the Microsoft platform.


* Like other BASIC variants, but unlike many other languages that use 1, Boolean <code>True</code> has numeric value −1. VB stores a Boolean as a [[two's complement]] signed integer with all ones in binary for true and zero for false. This is apparent when performing a (bitwise) <code>Not</code> operation on the two's complement value 0, which returns the two's complement value −1, in other words <code>True = Not False</code>. This inherent functionality becomes especially useful when performing logical operations on the individual bits of an integer such as <code>And</code>, <code>Or</code>, <code>Xor</code> and <code>Not</code>.<ref>{{cite web |url=http://vb.mvps.org/tips/Truth.asp |title=Microsoft Basic Logical Expression Evaluation |publisher=Vb.mvps.org |access-date=2009-06-16 |archive-date=2009-08-23 |archive-url=https://web.archive.org/web/20090823005932/http://vb.mvps.org/tips/Truth.asp |url-status=dead }}</ref> This definition of <code>True</code> is also consistent with BASIC since the early 1970s Microsoft BASIC implementation and is also related to the characteristics of CPU instructions at the time.
Recently, the use of VBScript has largely been superseded; in the browser it has almost completely been displaced by JavaScript and on the server by [[PHP programming language|PHP]], [[Java programming language|Java]] and [[Microsoft .NET|.NET]].


* Logical and bitwise operators are unified. This is unlike some C-derived languages (such as [[Perl]]), which have separate logical and bitwise operators. This is a traditional feature of BASIC.
=== Timeline ===


* Unlike for many languages which use zero for the lower bound of an [[Array data type|array]], VB allows the lower bound to be any value {{endash}} like in [[Pascal (programming language)|Pascal]] and [[Fortran]]. The <code>Option Base</code> statement can be used to set the default lower bound, but some claim that its use leads to confusion when reading code and is best avoided by always explicitly specifying the lower bound. This uncommon language trait does exist in [[Visual Basic .NET]] but not in [[VBScript]].
* Visual Basic 1.0 (May [[1991]]) was released for Windows.
: <code>OPTION BASE</code> was introduced by ANSI, with the standard for ANSI Minimal BASIC in the late 1970s.


* Tightly bound to the [[Microsoft Windows|Windows operating system]] and the [[Component Object Model]]. The native types for strings and arrays are the dedicated COM types, BSTR and SAFEARRAY.
* Visual Basic 1.0 for [[DOS]] was released in September [[1992]]. The language itself was not quite compatible with Visual Basic for Windows, as it was actually the next version of Microsoft's DOS-based BASIC compilers, [[Microsoft QuickBASIC compiler|QuickBASIC]] and BASIC Professional Development System. The interface was barely graphical, using extended [[ASCII]] characters to simulate the appearance of a [[GUI]].


* [[Banker's rounding]] as the default behavior when converting real numbers to integers with the <code>Round</code> function.<ref>{{cite web |url=http://support.microsoft.com/kb/194983 |title=PRB: Round Function different in VBA 6 and Excel Spreadsheet |website=Microsoft Support |access-date=2014-01-25 |archive-url=https://web.archive.org/web/20131029200859/http://support.microsoft.com/kb/194983 |archive-date=2013-10-29 |url-status=dead }}</ref> <code>? Round(2.5, 0)</code> gives 2, <code>? Round(3.5, 0)</code> gives 4.
* Visual Basic 2.0 was released in November [[1992]]. The programming environment was easier to use, and its speed was improved.


* An integer type value is automatically promoted to a floating point type in expressions that involve the normal division operator (<code>/</code>) so that division of one integer by another produces a result that may seem more intuitive from a mathematical perspective. VB provides an integer divide operator (<code>\</code>) that does truncate.
* Visual Basic 3.0 was released in the summer of [[1993]] and came in Standard and Professional versions. VB3 included a database engine that could read and write Access databases.


* By default, if a variable has not been declared or if no type declaration character is specified, it acts like a <code>[[Variant type (COM)|variant]]</code>. However this can be changed with Deftype statements such as <code>DefInt</code>, <code>DefBool</code>, <code>DefVar</code>, <code>DefObj</code>, <code>DefStr</code>. There are 12 <code>Deftype</code> statements in total offered by Visual Basic 6.0. The default type may be overridden for a specific declaration by using a special suffix character on the variable name (<code>#</code> for Double, <code>!</code> for Single, <code>&</code> for Long, <code>%</code> for Integer, <code>$</code> for String, and <code>@</code> for Currency) or using the key phrase <code>As (type)</code>. VB can be set up to require variable declarations via <code>Option Explicit</code>.
* Visual Basic 4.0 (August [[1995]]) was the first that could create [[32-bit]] as well as [[16-bit]] Windows programs. It also introduced the ability to write classes in Visual Basic.


==History==
* With version 5.0 (February [[1997]]), Microsoft released Visual Basic exclusively for [[32-bit]] versions of Windows. Programmers who preferred to write 16-bit programs were pleased to find that Visual Basic 5.0 was able to import programs written in Visual Basic 4.0, and it was not difficult to convert Visual Basic 5.0 programs to be compatible with Visual Basic 4.0. Visual Basic 5.0 also offered the ability to compile to native Windows executable code, eliminating the need for a runtime library.
[[File:AlanCooper.jpg|thumb|upright|Alan Cooper created the drag-and-drop design for the user interface of Visual Basic.]]


''[[BYTE]]'' reported in 1989 that, based on its experience with Macintosh software development, Microsoft "wants to provide a development environment that mimics the delivery environment". BASIC's string handling was preferable to C, the company's Greg Lobdell said, when developing the mostly transaction-processing applications Microsoft expected [[object-oriented programming]] tools to create.<ref name="microbytes198902">{{Cite magazine |date=February 1989 |title=BASIC Will Be the "Embedded Language" of Microsoft Applications |url=https://archive.org/details/eu_BYTE-1989-02_OCR/page/n15/mode/1up?view=theater |access-date=2024-10-08 |magazine=BYTE |page=12}}</ref>
* Visual Basic 6.0 (Summer [[1998]]) improved in a number of areas, including the ability to create web-based applications. VB6 will enter Microsoft's "non-supported phase" starting March [[2008]].


Visual Basic 1.0 was introduced in 1991. The drag and drop design for creating the user interface is derived from a prototype form generator developed by [[Alan Cooper (software designer)|Alan Cooper]] and his company called ''Tripod''.<ref>{{cite web|last=Cooper|first=Alan|title=Why I am "the father of Visual Basic"|url=https://www.cooper.com/alan/father_of_vb.html|date=22 April 1996|access-date=8 March 2017|archive-date=9 March 2017|archive-url=https://web.archive.org/web/20170309062139/https://www.cooper.com/alan/father_of_vb.html|url-status=dead}}</ref><ref>{{cite web
* [[Visual Basic .NET]] was launched in [[2001]] along with the [[Microsoft .NET|.NET Framework]]. Its language features are much richer than previous versions, although it is more complex, and many older VB programs must be rewritten to work in VB.NET.
|title = Alan Cooper Receiving the Windows Pioneer Award 1994
|date = September 23, 2010
|website = [[YouTube]]
|url = https://www.youtube.com/watch?v=BOKtFr_YOxk&t=265
|time = 4:25
|postscript = Bill Gates: "A lot of people have called you the father of Visual Basic. What do you think about that?"
}}</ref><ref>{{cite book
|title = Go To: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Maverick Scientists, and Ico
|first = Steve |last = Lohr
|year = 2008
|edition = revised
|publisher = Basic Books
|isbn = 9780786730766
|page = 96
|url = https://books.google.com/books?id=XfPLVx6qS_cC&q=%22Windows+Pioneer%22+cooper+site+microsoft.com&pg=PA96
|quote = Cooper ... gained industry recognition as the "Father of Visual Basic." (Microsoft's lawyers once sent Cooper a cease-and-desist order, demanding that he stop using that title. But after Cooper complained, Gates patched things up and even lauded him as a "Windows Pioneer" at an industry conference.)
}}</ref> Microsoft contracted with Cooper and his associates to develop Tripod into a programmable form system for [[Windows 3.0]], under the code name ''Ruby'' (no relation to the later [[Ruby (programming language)|Ruby programming language]]). Tripod did not include a programming language at all.


Microsoft decided to combine Ruby with the Basic language to create Visual Basic. The Ruby interface generator provided the "visual" part of Visual Basic, and this was combined with the "EB" Embedded BASIC engine designed for Microsoft's abandoned "Omega" database system. Ruby also provided the ability to load [[dynamic-link library|dynamic link libraries]] containing additional controls (then called "gizmos"), which later became the VBX interface.<ref>{{cite web| url=http://www.forestmoon.com/BIRTHofVB/BIRTHofVB.html| title = The Birth of Visual Basic}} Rian " Petot " Danao I <3 19</ref>
* [[Visual Basic .NET 2003]] was launched in [[2003]] along with the [[Microsoft .NET|.NET Framework]] 1.1.


===Timeline===
* In [[2004]] Microsoft released a [[development stage|beta]] version of Visual Basic 2005 (codename Whidbey).
[[File:Microsoft Visual Basic for MS-DOS (Professional Edition Version1.00).png|thumb|Visual Basic for MS-DOS]]
[[File:VBDOS-icon.PNG|thumb|VB DOS icon]]


* Project 'basic Thunder' was initiated in 1990.<ref>{{cite web|last=George|first=Mack|title=History of Visual Basic|url=http://www.ojodepez-fanzine.net/network/qbdl/history_of_visual_basic.html|work=June 2002|publisher=George Mack, 3rd edition, Copyright June 2002|access-date=10 April 2014}}</ref> Thunder persisted through to the last release of Visual Basic in the name of the primary internal function, "ThunderRTMain".
=== Visual Basic and HyperCard ===


* Visual Basic 1.0 (May 1991) was released for Windows at the Comdex/Windows World trade show in Atlanta, Georgia.
Putting Visual Basic into historical context invites comparison with [[HyperCard]], a programming tool developed by [[Bill Atkinson]], [[Dan Winkler]], and their associates at [[Apple Computer]] and released in [[1987]]. Both HyperCard and VB initially present the user with a "drawing" environment in which UI objects can be dragged, sized, captioned, and have a set of properties edited. Both connect a set of events, associated with the visual objects, to fragments of code. In both cases, the code is written in a programming language that is intended to cater to the novice and be easy to use. This is not to suggest that VB is a clone or copy of HyperCard. The relationship is more like that of C or Pascal to ALGOL; one can detect a family resemblance.


* Visual Basic 1.0 for [[DOS]] was released in September 1992. The language itself was not quite compatible with Visual Basic for Windows, as it was the next version of Microsoft's DOS-based BASIC compilers, [[QuickBASIC]] and BASIC Professional Development System. The interface used a [[text-based user interface]], using [[extended ASCII]] characters to simulate the appearance of a [[graphical user interface|GUI]].
Unlike VB, HyperCard's programming language, [[HyperTalk]], like COBOL before it (and [[AppleScript]] after it), consists of syntactically valid English sentences, such as "Get the number of card buttons." (Whether this actually makes it any easier to read, write, understand, or maintain than BASIC is arguable.)


* Visual Basic 2.0 was released in November 1992. The programming environment was easier to use, and its speed was improved. Notably, forms became instantiable objects, thus laying the foundational concepts of class modules as were later offered in VB4.
The biggest difference, and the reason why VB was a breakthrough in a sense that HyperCard never was, is that VB produced applications that were virtually indistinguishable in look, feel, and general characteristics from Windows applications produced with traditional development tools. That is, it produced "real" Windows applications. HyperCard produced HyperCard stacks, not true Macintosh applications. HyperCard briefly spawned a limited cottage industry of commercial "stackware," rather like the former market in spreadsheet templates, but saw little commercial application (with notable exceptions: the fully commercial adventure game [[Myst]] was based on an elaborated version of HyperCard). HyperCard "stacks" were always recognizable as such.


* Visual Basic 3.0 was released in the summer of 1993 and came in Standard and Professional versions. VB3 included version 1.1 of the [[Jet Database Engine]] that could read and write Jet (or Access) 1.x databases.
HyperCard made a big impression when it was released in 1987, but for various reasons Apple did not follow it up vigorously or develop it much beyond what it was in 1987. By the year 2000 Apple had effectively abandoned it; it was officially discontinued in April 2004.


* Visual Basic 4.0 (August 1995) was the first version that could create [[32-bit]] as well as [[16-bit]] Windows programs. It has three editions; Standard, Professional, and Enterprise. It also introduced the ability to write non-GUI classes in Visual Basic. With VB4 the language was separated from the GUI library, and made available as VBA, in which form it was embedded with the Office 95 suite. To ease migration of Office macros and scripts, features from WordBasic, Excel Basic and Access Basic were incorporated into the language. Incompatibilities between different releases of VB4 caused installation and operation problems. While previous versions of Visual Basic had used VBX controls, Visual Basic now used OLE controls (with files names ending in .OCX) instead. These were later to be named ActiveX controls.


* With version 5.0 (February 1997), Microsoft released Visual Basic exclusively for [[32-bit]] versions of Windows. Programmers who preferred to write 16-bit programs were able to import programs written in Visual Basic 4.0 to Visual Basic 5.0, and Visual Basic 5.0 programs can easily be converted to Visual Basic 4.0. Visual Basic 5.0 also introduced the ability to create custom user controls, as well as the ability to compile to native Windows executable code, speeding up calculation-intensive code execution. A free, downloadable Control Creation Edition was also released for creation of [[ActiveX|ActiveX control]]s. It was also used as an introductory form of Visual Basic: a regular .exe project could be created and run in the IDE, but not compiled.

* Visual Basic 6.0 (Mid-1998) improved in a number of areas<ref>{{cite web| url=http://www.insteptech.com/techLibrary/vbClassic/vb6_news.htm| title = What's new in VB6? | publisher = www.insteptech.com | author = www.insteptech.com | date = 2005-07-22}}</ref> including the ability to create web-based applications.

* Mainstream Support for Microsoft Visual Basic 6.0 ended on March 31, 2005, and ''Extended'' support ended in March 2008.<ref>{{cite web|url=http://msdn2.microsoft.com/en-us/vbrun/ms788707.aspx |title=Product Family Life Cycle Guidelines for Visual Basic 6.0 |publisher=Msdn2.microsoft.com |date=2005-03-31 |access-date=2009-06-16}}</ref> However, primary components of the Visual Basic 6 ''development'' environment run in all 32-bit versions of Windows up to and including Windows 11.<ref>{{cite web|url=https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/visual-basic-6-support-policy|title=Support Statement for Visual Basic 6.0 on Windows|publisher=Microsoft|date=2018-01-17|access-date=2019-06-20}}</ref>
{{Clear}}

==Learning==

Classic Visual Basic was released before the commercial Internet, so learning VB programming skills involved using digital help resources shipped with the product, attending user group meetings, and buying books and magazines. A range of book publishers supplied materials for new and experienced VB programmers, including Microsoft Press, IDG Books, Howard W. Sams, O’Reilly, Osborne McGraw-Hill, Que, Sybex, Ventana Press, Wiley, Wrox, and Ziff Davis Press.<ref>{{cite book |last1=Halvorson |first1=Michael J. |title=Code Nation: Personal Computing and the Learn to Program Movement in America |date=2020 |publisher=ACM Books |location=New York, NY |page=159}}</ref>

When Visual Basic 1.0 was released, just a few commercial books were available, but publishers caught up with demand by Visual Basic 3.0 (1993), a release designed to coincide with [[Windows 3.1]].<ref>{{cite book |last1=Halvorson |first1=Michael J. |title=Code Nation: Personal Computing and the Learn to Program Movement in America |date=2020 |publisher=ACM Books |location=New York, NY |page=159}}</ref>

Popular VB programming books included:

* John Clark Craig's ''Microsoft Visual Basic Programmer’s Workshop'' (1991), a book-and-software toolkit for Visual Basic 1.0 programmers.
* Ross Nelson’s ''Running Visual Basic for Windows'' (1992), one of the first introductory primers for new programmers, released for Visual Basic 2.0 and updated for Visual Basic 3.0.
* Michael J. Young's ''Visual Basic—Game Programming for Windows'' (1992), an early game programming book for Windows that featured ready-to-run strategy games and fractals.
* [[Michael Halvorson|Michael Halvorson's]] ''Microsoft Visual Basic 4 Step by Step'' (1995), a book that introduced Visual Basic 4.0 programming by focusing on the new [[Windows 95]] user interface and topics like event-driven programming, managing data, using toolbox controls, processing text, and debugging.
* Bruce McKinney’s ''Hardcore Visual Basic: Secrets, Shortcuts, and Solutions for Programming Windows without Using C'' (1995), a text for advanced VB users that taught Windows programming techniques usually implemented in [[Microsoft C]].
* Dan Appleman’s ''Visual Basic 5.0 Programmer’s Guide to the Win32 API'' (1997), which included information from the [[Windows SDK]] about using the features of Windows 95 and [[Windows NT 4.0]].
* John Connell's ''Beginning Visual Basic 6 Database Programming'' (1998), written for VB programmers who needed to access information in corporate databases, a topic of major interest in the late 1990s and 2000s.

==Derivative technologies==

[[Microsoft]] developed many derivatives of VB (classic), including:

* [[Visual Basic .NET]] is Microsoft's successor to Visual Basic 6.0, and part of Microsoft's [[.NET]] ecosystem (which over time has sometimes been called framework and core). It is not [[backward compatibility|backwards compatible]] with Visual Basic 6.0. An automated conversion tool exists, but fully automated conversion for most projects is not possible.<ref>{{cite web
|url = http://www.devx.com/vb/article/16822
|title = Abandoning the Fantasy of VB Migration Wizardry
|access-date = 2007-05-17
|last = Piquet
|first = Lori
|date = 2002-02-20
|work = DevX.com
|publisher = Jupitermedia
|archive-date = 2007-05-19
|archive-url = https://web.archive.org/web/20070519090414/http://www.devx.com/vb/article/16822
|url-status = dead
}}</ref>

* [[Visual Basic for Applications]] (VBA)<ref>{{cite web | title = VBA for Office Developers | publisher = Microsoft | url = http://msdn.microsoft.com/en-us/office/ff688774.aspx}}</ref> is a [[scripting language]] embedded in many Microsoft applications such as [[Microsoft Office]], and third-party products like [[SolidWorks]], [[AutoCAD]], [[WordPerfect Office|WordPerfect Office 2002]], [[ArcGIS]], [[Sage 300 ERP]], and Business Objects Desktop Intelligence. There are small inconsistencies in the way VBA is implemented in different applications, but it is largely the same language as Visual Basic 6.0 and uses the same runtime library. Visual Basic development ended with 6.0, but in 2010 Microsoft introduced VBA 7 to provide extended features and add 64-bit support.<ref name="VBA 7">{{cite web|title=Compatibility Between the 32-bit and 64-bit Versions of Office 2010|url=http://msdn.microsoft.com/en-us/library/ee691831.aspx|publisher=Microsoft Corporation|access-date=16 July 2012}}</ref>

* [[VBScript]] is the default language for [[Active Server Pages]]. It can be used in [[Microsoft Windows|Windows]] scripting and client-side [[web page]] scripting. It resembles VB in [[Syntax (programming languages)|syntax]], but is a separate language—executed by vbscript.dll instead of the VB runtime. ASP and VBScript should not be confused with [[ASP.NET]], which uses the [[.NET Framework]] for compiled web pages.

* [[OpenOffice Basic]] is a Visual Basic compatible interpreter that originated in [[StarOffice]] office suite.

* [[Gambas]] is a Visual Basic inspired [[free software]] programming language for the Linux operating system. It is not a clone of Visual Basic, but it does have the ability to convert Visual Basic programs to Gambas.

* [[LotusScript]] is a VBA variant available in [[Lotus SmartSuite]] and [[Lotus Notes]].

* Later versions of [[Corel WordPerfect Office]] implement access to VBA as one of the macro/scripting languages, the other major ones being [[CorelScript]] and [[PerfectScript]].

* Earlier versions of [[Microsoft Word]] use a variant of VB called [[WordBasic]].

==Issues==

===Performance===

Versions before 5 compiled the code to [[Microsoft P-Code|P-Code]] {{endash}} which is interpreted at runtime. The benefits of P-Code include portability and smaller binary file sizes, but it usually slows execution, since an interpreter adds a layer to the execution environment. VB applications require the Microsoft VB runtime MSVBVM##.DLL, where ## is a version number, either 50 or 60. MSVBVM60.dll comes standard with Windows in all editions from Windows 98 to Windows 11 although some editions of Windows 7 do not include it. For Windows 95 however the application installation process requires the DLL needed by the program. VB 5 and 6 can compile code to either native or P-Code but the runtime is still required for built-in functions and forms management.

===Other===

Criticisms of VB (prior to VB.NET) include:<ref>{{cite book|url=https://archive.org/details/professionalaspn00home|url-access=registration|title=Professional ASP.NET 1.1|author1=Alex Homer |author2=Dave Sussman |author3=Rob Howard |author4=Brian Francis |author5=Karli Watson |author6=Richard Anderson |year=2004|isbn=0-7645-5890-0|publisher=Wiley|access-date=2008-10-08|page=[https://archive.org/details/professionalaspn00home/page/71 71]}}</ref>

* versioning problems associated with DLLs, known as "[[DLL hell]]"
* poor support for [[object-oriented programming]]<ref>{{cite web|url=http://msdn.microsoft.com/en-us/library/aa227881(VS.60).aspx|title=Avoid Writing Tedious, Boring Code|publisher=[[Microsoft]]|date=December 2000|author=Marc D'Aoust|access-date=2008-11-10}}</ref>
* can only create multi-[[thread (computer science)|threaded]] applications using ActiveX or DLL
* [[variant type]]s having a greater performance and storage "overhead" than [[strong and weak typing|strongly-typed programming language]]s
* dependency on complex and fragile COM registry entries<ref>{{cite book|url=https://books.google.com/books?id=y0uURUiVhgwC|title=Pro VB 2008 and the .NET 3.5 Platform: The expert's voice in .NET|publisher=Apress|year=2008|author=Andrew Troelsen|isbn=978-1-59059-822-1|page=5}}</ref>

==Legacy development and support==

All versions of the Visual Basic IDE, from 1.0 to 6.0, are no longer supported by Microsoft. The associated runtime environments are also unsupported, except for the Visual Basic 6 core runtime environment, which Microsoft officially supports for the lifetime of [[Windows 10]]<ref>{{cite web|url=http://blogs.windows.com/buildingapps/2015/06/22/getting-ready-for-windows-10-sdks-compatibility-bridges/ |title=Getting ready for Windows 10 – SDKs, compatibility, bridges |author=Denning, Adam |publisher=Building Apps for Windows blog |date=2015-06-22 |access-date=2015-08-02}}</ref> and [[Windows 11]].<ref>{{Cite web |last=paulyuk |title=Support Statement for Visual Basic 6.0 |url=https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/visual-basic-6-support-policy |access-date=2022-07-26 |website=docs.microsoft.com |language=en-us}}</ref> Third party components that shipped with Visual Studio 6.0 are not included in this support statement. Some legacy Visual Basic components may still work on newer platforms, despite being unsupported by Microsoft and other vendors. Documentation for Visual Basic 6.0, its application programming interface and tools is best covered in the last [[MSDN]] release before Visual Studio.NET 2002. Later releases of MSDN focused on .NET development and had significant parts of the Visual Basic 6.0 programming documentation removed as the language evolved, and support for older code ended. Although vendor support for Visual Basic 6 has ended, and the product has never been supported on the latest versions of Windows, key parts of the environment still work on newer platforms. It is possible to get a subset of the development environment working on 32-bit and 64-bit versions of Windows Vista, Windows 7, Windows 8, Windows 10 and Windows 11.<ref>{{cite web|url=http://blog.danbrust.net/2015/09/14/installing-visual-basic-studio-6-on-windows-10/|title=Installing Visual Basic/Studio 6 on Windows 10|first=Brust|last=Dan|date=14 September 2015|website=danbrust.net}}</ref> Owing to its persistent remaining popularity,<ref>{{cite web|url=https://visualstudiomagazine.com/articles/2020/07/07/tiobe-july-2020-vb.aspx|title=Popularity Index: Classic Visual Basic Hangs In There|first=David|last=Ramel|date=2020-07-07|access-date=2023-03-28}}</ref> third-party attempts to further support it, such as Rubberduck, exist.<ref>{{cite web|url=https://visualstudiomagazine.com/articles/2020/02/28/rubberduck.aspx|title=Visual Basic Resurgence? Project Seeks to 'Bring the VBE into This Century!'|first=David|last=Ramel|date=2020-02-28|website=Visual Studio Magazine|access-date=2023-03-28}}</ref>

==Example code==
<!-- Please don't add any sample code before discussing it on the talk page. -->
The following code snippet displays a message box saying "Hello, World!" as the window loads:
<syntaxhighlight lang="vbscript" highlight="3">
Private Sub Form_Load()
' Execute a simple message box that says "Hello, World!"
MsgBox "Hello, World!"
End Sub
</syntaxhighlight>
This snippet makes a counter that moves up 1 every second (a label and a timer control need to be added to the form for this to work) until the form is closed or an [[integer overflow]] occurs:
<syntaxhighlight lang="vbscript">
Option Explicit
Dim Count As Integer
Private Sub Form_Load()
Count = 0
Timer1.Interval = 1000 ' units of milliseconds
End Sub
Private Sub Timer1_Timer()
Count = Count + 1
Label1.Caption = Count
End Sub
</syntaxhighlight>

==See also==
{{Portal|Computer programming}}

* {{mono|[[IIf]]}} – a function in several editions of Visual Basic roughly equivalent to the [[?:]] conditional operator of C and related languages.
* [[Comparison of programming languages]]
* [[Control array]]
{{Clear}}

==References==
{{Reflist|30em}}


==External links==
==External links==
{{Wikiversity|Visual Basic}}
*[http://msdn.microsoft.com/vbasic/ Visual Basic at MSDN] (primarily supports the VB.Net version)
{{Wikibooks|Programming:Visual Basic Classic}}
*[http://msdn.microsoft.com/vbasic/previous/vb6/ VB 6.0 at MSDN]
{{Commons category}}
*[http://visualbasic.about.com/ Visual Basic Section on About.com]
{{Prone to spam|date=August 2014}}
*[http://www.vbtutor.net/ Visual Basic Tutorial for Beginners]
<!-- {{No more links}}
*[http://members.shaw.ca/mattleung/How%20to%20Create%20a%20Simple%20Game%20Using%20Microsoft%20Visual%20Basic.pdf How to Create a Simple Game in VB.NET]


Please be cautious adding more external links.


Wikipedia is not a collection of links and should not be used for advertising.
{{Major programming languages small}}


Excessive or inappropriate links will be removed.
[[Category:Programming languages]]

[[Category:Major programming languages]]
See [[Wikipedia:External links]] and [[Wikipedia:Spam]] for details.
[[Category:Imperative programming languages]]

If there are already suitable links, propose additions or replacements on
the article's talk page, or submit your link to the relevant category at
DMOZ (dmoz.org) and link there using {{Dmoz}}.

-->
*[https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/visual-basic-6.0-documentation Visual Basic 6.0 Resource Center]
*[https://msdn.microsoft.com/en-gb/dd408373.aspx Secure your Visual Basic 6.0 investment with Microsoft .NET]: Migrating from Visual Basic 6.0 to Visual Basic 2008 <!-- dead link http://msdn.microsoft.com/dd408373.aspx -->
*[https://www.infoq.com/news/2012/02/vb6_supported_on_win8 Visual Basic 6 Renewed to Run on Windows 8]
*[http://blog.danbrust.net/2015/09/14/installing-visual-basic-studio-6-on-windows-10/#.XbQawehKjb0 Instructions for installing Visual Basic 6 on a Windows 10 computer]

{{BASIC|state=open}}
{{MS DevTools|state=collapsed}}
{{GUI builders}}
{{Authority control}}

[[Category:Articles with example BASIC code]]
[[Category:BASIC compilers]] <!-- 5 and above -->
[[Category:BASIC interpreters]] <!-- all P-code runtimes -->
[[Category:Integrated development environments]]
[[Category:Microsoft BASIC]]
[[Category:Microsoft development tools]]
[[Category:Microsoft programming languages]]
[[Category:Microsoft Visual Studio|Basic]]
[[Category:Object-based programming languages]]
[[Category:Object-oriented programming languages]]
[[Category:Procedural programming languages]]
[[Category:Procedural programming languages]]
[[Category:Programming languages]]
[[Category:Programming languages created in 1991]]
[[Category:BASIC programming language family]]
[[Category:BASIC programming language family]]
[[Category:BASIC dialects]]
[[Category:User interface builders]]

[[da:Visual Basic]]
[[de:Visual Basic]]
[[es:Visual Basic]]
[[fr:Visual Basic]]
[[he:Visual Basic]]
[[hr:Microsoft Visual Basic]]
[[it:Visual Basic]]
[[ja:Microsoft Visual Basic]]
[[ko:&#48708;&#51452;&#50620; &#48288;&#51060;&#51649;]]
[[ms:Visual Basic]]
[[nl:Visual Basic]]
[[no:Visual Basic]]
[[pl:Visual Basic]]
[[pt:Visual Basic]]
[[ru:Visual Basic]]
[[zh:Visual Basic]]

Latest revision as of 13:32, 24 April 2025

Visual Basic
Visual Basic 6.0 IDE running on Windows XP
ParadigmObject-based and event-driven
DeveloperMicrosoft
First appearedMay 1991; 34 years ago (1991-05)
Final release
6.0 / 1998; 27 years ago (1998)
Typing disciplineStatic, strong
OSMicrosoft Windows and MS-DOS
Websitelearn.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/visual-basic-6.0-documentation
Major implementations
Microsoft Visual Studio
Influenced by
BASIC, Microsoft BASIC, QBasic
Influenced
Visual Basic .NET, Visual Basic for Applications, Windows Forms, Gambas, Xojo, Basic4ppc, Basic4android, and NS Basic

Visual Basic (VB), sometimes referred to as Classic Visual Basic,[1][2] is a third-generation programming language based on BASIC, as well as an associated integrated development environment (IDE). Visual Basic was developed by Microsoft for Windows, and is known for supporting rapid application development (RAD) of graphical user interface (GUI) applications, event-driven programming, and both consumption and development of components via the Component Object Model (COM) technology.

VB was first released in 1991. The final release was version 6 (VB6) in 1998. On April 8, 2008, Microsoft stopped supporting the VB6 IDE, relegating it to legacy status. The Microsoft VB team still maintains compatibility for VB6 applications through its "It Just Works" program on supported Windows operating systems.[3]

Visual Basic .NET (VB.NET) is based on Classic Visual Basic. Because VB.NET was later rebranded back to Visual Basic, the name is ambiguous: it can refer to either Classic Visual Basic or to the .NET version.

Just as BASIC was originally intended to be easy to learn, Microsoft intended the same for VB.[4][5]

Development of a VB application is exclusively supported via the VB integrated development environment (IDE), an application in the contemporary Visual Studio suite of tools. Unlike modern versions of Visual Studio, which support many languages including VB (.NET), the VB IDE only supports VB.

In 2014, some software developers still preferred Visual Basic 6.0 over its successor, Visual Basic .NET.[6] Visual Basic 6.0 was selected as the most dreaded programming language by respondents of Stack Overflow's annual developer survey in 2016, 2017, and 2018.[7][8][9]

Overview

[edit]

As was the intention of older BASIC variants, VB was intended to have a low learning curve. Further, the IDE was intended to promote productivity; even for complex GUI applications. Programming involves visually arranging components or controls on a form, specifying attributes and actions for those components, and writing code that directs behavior. Since components have default attributes and actions, a programmer can develop a simple program without writing much code.

Programs built with earlier versions suffered performance problems, but faster computers and native code compilation made this less of an issue.

Since a VB program is compiled as a native code executable instead of interpreted as old BASIC variants, it runs relatively fast and requires relatively little storage space. But, from version 5 on, it requires relatively large library files to be loaded at runtime; about 1 MB. Core runtime libraries are included by default in Windows 2000 and later, but extended runtime components require extra installation consideration. Earlier versions of Microsoft Windows (95/98/NT), require the runtime libraries to be distributed with the executable.

An empty form in Visual Basic 6

Forms are created using drag-and-drop techniques. A tool is used to place controls (e.g., text boxes, buttons, etc.) on the form (window). Controls have attributes and event handlers associated with them. Default values are provided when the control is created, but may be changed by the programmer. Many attribute values can be modified during run time based on user actions or changes in the environment, providing a dynamic application. For example, code can be inserted into the form resize event handler to reposition a control so that it remains centered on the form, expands to fill up the form, etc. By inserting code into the event handler for a keypress in a text box, the program can automatically translate the case of the text being entered, or even prevent certain characters from being inserted.

Development in the IDE is organized as a project which can be configured to output as a program (EXE), a dynamic-link library (DLL) or an ActiveX control library (OCX) which is a specialized DLL.

Controls provide the graphical functionality of a GUI application, and programmers attach code to event handlers to perform actions. For example, a drop-down control displays a list of items. When the user selects an item, an event handler is automatically called that executes the code that the programmer attached to the handler.

For a DLL, the VB code generally provides no user interface, and instead provides COM objects to other programs. This allows for capabilities such as server-side processing or an add-in module.

Via the COM technology, unused memory is recovered for reuse using reference counting; recovering when the count reaches zero. VB reduces the count when a variable goes out of scope or when assigned to Nothing. This design prevents memory leaks that plague some, older languages such as C & C++. It differs significantly from the more modern approach of garbage collection.

VB provides a large library of utility objects, and it provides basic support for object-oriented programming.

Unlike many other programming languages, VB code is not case-sensitive – though the IDE transforms keywords into a standard case and variable names to match the case used elsewhere in the project. Of note, string comparison is case sensitive by default.

The VB compiler is shared with other Visual Studio suite languages, C and C++. Nevertheless, by default the restrictions in the IDE do not allow creation of some targets (Windows model DLLs) and threading models, but over the years, developers have bypassed these restrictions.

Features

[edit]
A function using the If, Then, Else and Dim statements

Visual Basic has notable features and characteristics that are in some cases different than other BASIC variants or from other common languages:

  • Allows use of the Windows API via an external function declaration technology
  • Supports sharing and reuse via the COM component technology. A programmer can create an application using components provided by VB, developed internally or from third parties. Over time the development community produced and shared many components.[6][10][11][12][13]
  • Unlike older BASIC variants, instead of requiring line numbers to support branching, code is grouped into named blocks delimited by Sub...End Sub or Function...End Function. VB retains line number support[14]
  • Code statements have no terminating character other than a line ending (carriage return/line feed), and versions since 3 allow for multi-line statements for concatenation of strings or explicitly using the underscore character (_) at the end of a line[15][16]
  • A code comment is denoted by a single apostrophe (') character, like: ' This is a comment
  • Looping statement blocks begin and end with keywords: Do...Loop, While...End While, For...Next [17]
  • Chained variable assignment is not allowed; for example A = B = C does not result in the values of A, B and C being equal. The Boolean result of "is B equal to C?" is stored in A
  • Like other BASIC variants, but unlike many other languages that use 1, Boolean True has numeric value −1. VB stores a Boolean as a two's complement signed integer with all ones in binary for true and zero for false. This is apparent when performing a (bitwise) Not operation on the two's complement value 0, which returns the two's complement value −1, in other words True = Not False. This inherent functionality becomes especially useful when performing logical operations on the individual bits of an integer such as And, Or, Xor and Not.[18] This definition of True is also consistent with BASIC since the early 1970s Microsoft BASIC implementation and is also related to the characteristics of CPU instructions at the time.
  • Logical and bitwise operators are unified. This is unlike some C-derived languages (such as Perl), which have separate logical and bitwise operators. This is a traditional feature of BASIC.
  • Unlike for many languages which use zero for the lower bound of an array, VB allows the lower bound to be any value – like in Pascal and Fortran. The Option Base statement can be used to set the default lower bound, but some claim that its use leads to confusion when reading code and is best avoided by always explicitly specifying the lower bound. This uncommon language trait does exist in Visual Basic .NET but not in VBScript.
OPTION BASE was introduced by ANSI, with the standard for ANSI Minimal BASIC in the late 1970s.
  • Banker's rounding as the default behavior when converting real numbers to integers with the Round function.[19] ? Round(2.5, 0) gives 2, ? Round(3.5, 0) gives 4.
  • An integer type value is automatically promoted to a floating point type in expressions that involve the normal division operator (/) so that division of one integer by another produces a result that may seem more intuitive from a mathematical perspective. VB provides an integer divide operator (\) that does truncate.
  • By default, if a variable has not been declared or if no type declaration character is specified, it acts like a variant. However this can be changed with Deftype statements such as DefInt, DefBool, DefVar, DefObj, DefStr. There are 12 Deftype statements in total offered by Visual Basic 6.0. The default type may be overridden for a specific declaration by using a special suffix character on the variable name (# for Double, ! for Single, & for Long, % for Integer, $ for String, and @ for Currency) or using the key phrase As (type). VB can be set up to require variable declarations via Option Explicit.

History

[edit]
Alan Cooper created the drag-and-drop design for the user interface of Visual Basic.

BYTE reported in 1989 that, based on its experience with Macintosh software development, Microsoft "wants to provide a development environment that mimics the delivery environment". BASIC's string handling was preferable to C, the company's Greg Lobdell said, when developing the mostly transaction-processing applications Microsoft expected object-oriented programming tools to create.[20]

Visual Basic 1.0 was introduced in 1991. The drag and drop design for creating the user interface is derived from a prototype form generator developed by Alan Cooper and his company called Tripod.[21][22][23] Microsoft contracted with Cooper and his associates to develop Tripod into a programmable form system for Windows 3.0, under the code name Ruby (no relation to the later Ruby programming language). Tripod did not include a programming language at all.

Microsoft decided to combine Ruby with the Basic language to create Visual Basic. The Ruby interface generator provided the "visual" part of Visual Basic, and this was combined with the "EB" Embedded BASIC engine designed for Microsoft's abandoned "Omega" database system. Ruby also provided the ability to load dynamic link libraries containing additional controls (then called "gizmos"), which later became the VBX interface.[24]

Timeline

[edit]
Visual Basic for MS-DOS
VB DOS icon
  • Project 'basic Thunder' was initiated in 1990.[25] Thunder persisted through to the last release of Visual Basic in the name of the primary internal function, "ThunderRTMain".
  • Visual Basic 1.0 (May 1991) was released for Windows at the Comdex/Windows World trade show in Atlanta, Georgia.
  • Visual Basic 1.0 for DOS was released in September 1992. The language itself was not quite compatible with Visual Basic for Windows, as it was the next version of Microsoft's DOS-based BASIC compilers, QuickBASIC and BASIC Professional Development System. The interface used a text-based user interface, using extended ASCII characters to simulate the appearance of a GUI.
  • Visual Basic 2.0 was released in November 1992. The programming environment was easier to use, and its speed was improved. Notably, forms became instantiable objects, thus laying the foundational concepts of class modules as were later offered in VB4.
  • Visual Basic 3.0 was released in the summer of 1993 and came in Standard and Professional versions. VB3 included version 1.1 of the Jet Database Engine that could read and write Jet (or Access) 1.x databases.
  • Visual Basic 4.0 (August 1995) was the first version that could create 32-bit as well as 16-bit Windows programs. It has three editions; Standard, Professional, and Enterprise. It also introduced the ability to write non-GUI classes in Visual Basic. With VB4 the language was separated from the GUI library, and made available as VBA, in which form it was embedded with the Office 95 suite. To ease migration of Office macros and scripts, features from WordBasic, Excel Basic and Access Basic were incorporated into the language. Incompatibilities between different releases of VB4 caused installation and operation problems. While previous versions of Visual Basic had used VBX controls, Visual Basic now used OLE controls (with files names ending in .OCX) instead. These were later to be named ActiveX controls.
  • With version 5.0 (February 1997), Microsoft released Visual Basic exclusively for 32-bit versions of Windows. Programmers who preferred to write 16-bit programs were able to import programs written in Visual Basic 4.0 to Visual Basic 5.0, and Visual Basic 5.0 programs can easily be converted to Visual Basic 4.0. Visual Basic 5.0 also introduced the ability to create custom user controls, as well as the ability to compile to native Windows executable code, speeding up calculation-intensive code execution. A free, downloadable Control Creation Edition was also released for creation of ActiveX controls. It was also used as an introductory form of Visual Basic: a regular .exe project could be created and run in the IDE, but not compiled.
  • Visual Basic 6.0 (Mid-1998) improved in a number of areas[26] including the ability to create web-based applications.
  • Mainstream Support for Microsoft Visual Basic 6.0 ended on March 31, 2005, and Extended support ended in March 2008.[27] However, primary components of the Visual Basic 6 development environment run in all 32-bit versions of Windows up to and including Windows 11.[28]

Learning

[edit]

Classic Visual Basic was released before the commercial Internet, so learning VB programming skills involved using digital help resources shipped with the product, attending user group meetings, and buying books and magazines. A range of book publishers supplied materials for new and experienced VB programmers, including Microsoft Press, IDG Books, Howard W. Sams, O’Reilly, Osborne McGraw-Hill, Que, Sybex, Ventana Press, Wiley, Wrox, and Ziff Davis Press.[29]

When Visual Basic 1.0 was released, just a few commercial books were available, but publishers caught up with demand by Visual Basic 3.0 (1993), a release designed to coincide with Windows 3.1.[30]

Popular VB programming books included:

  • John Clark Craig's Microsoft Visual Basic Programmer’s Workshop (1991), a book-and-software toolkit for Visual Basic 1.0 programmers.
  • Ross Nelson’s Running Visual Basic for Windows (1992), one of the first introductory primers for new programmers, released for Visual Basic 2.0 and updated for Visual Basic 3.0.
  • Michael J. Young's Visual Basic—Game Programming for Windows (1992), an early game programming book for Windows that featured ready-to-run strategy games and fractals.
  • Michael Halvorson's Microsoft Visual Basic 4 Step by Step (1995), a book that introduced Visual Basic 4.0 programming by focusing on the new Windows 95 user interface and topics like event-driven programming, managing data, using toolbox controls, processing text, and debugging.
  • Bruce McKinney’s Hardcore Visual Basic: Secrets, Shortcuts, and Solutions for Programming Windows without Using C (1995), a text for advanced VB users that taught Windows programming techniques usually implemented in Microsoft C.
  • Dan Appleman’s Visual Basic 5.0 Programmer’s Guide to the Win32 API (1997), which included information from the Windows SDK about using the features of Windows 95 and Windows NT 4.0.
  • John Connell's Beginning Visual Basic 6 Database Programming (1998), written for VB programmers who needed to access information in corporate databases, a topic of major interest in the late 1990s and 2000s.

Derivative technologies

[edit]

Microsoft developed many derivatives of VB (classic), including:

  • Visual Basic .NET is Microsoft's successor to Visual Basic 6.0, and part of Microsoft's .NET ecosystem (which over time has sometimes been called framework and core). It is not backwards compatible with Visual Basic 6.0. An automated conversion tool exists, but fully automated conversion for most projects is not possible.[31]
  • VBScript is the default language for Active Server Pages. It can be used in Windows scripting and client-side web page scripting. It resembles VB in syntax, but is a separate language—executed by vbscript.dll instead of the VB runtime. ASP and VBScript should not be confused with ASP.NET, which uses the .NET Framework for compiled web pages.
  • Gambas is a Visual Basic inspired free software programming language for the Linux operating system. It is not a clone of Visual Basic, but it does have the ability to convert Visual Basic programs to Gambas.

Issues

[edit]

Performance

[edit]

Versions before 5 compiled the code to P-Code – which is interpreted at runtime. The benefits of P-Code include portability and smaller binary file sizes, but it usually slows execution, since an interpreter adds a layer to the execution environment. VB applications require the Microsoft VB runtime MSVBVM##.DLL, where ## is a version number, either 50 or 60. MSVBVM60.dll comes standard with Windows in all editions from Windows 98 to Windows 11 although some editions of Windows 7 do not include it. For Windows 95 however the application installation process requires the DLL needed by the program. VB 5 and 6 can compile code to either native or P-Code but the runtime is still required for built-in functions and forms management.

Other

[edit]

Criticisms of VB (prior to VB.NET) include:[34]

Legacy development and support

[edit]

All versions of the Visual Basic IDE, from 1.0 to 6.0, are no longer supported by Microsoft. The associated runtime environments are also unsupported, except for the Visual Basic 6 core runtime environment, which Microsoft officially supports for the lifetime of Windows 10[37] and Windows 11.[38] Third party components that shipped with Visual Studio 6.0 are not included in this support statement. Some legacy Visual Basic components may still work on newer platforms, despite being unsupported by Microsoft and other vendors. Documentation for Visual Basic 6.0, its application programming interface and tools is best covered in the last MSDN release before Visual Studio.NET 2002. Later releases of MSDN focused on .NET development and had significant parts of the Visual Basic 6.0 programming documentation removed as the language evolved, and support for older code ended. Although vendor support for Visual Basic 6 has ended, and the product has never been supported on the latest versions of Windows, key parts of the environment still work on newer platforms. It is possible to get a subset of the development environment working on 32-bit and 64-bit versions of Windows Vista, Windows 7, Windows 8, Windows 10 and Windows 11.[39] Owing to its persistent remaining popularity,[40] third-party attempts to further support it, such as Rubberduck, exist.[41]

Example code

[edit]

The following code snippet displays a message box saying "Hello, World!" as the window loads:

Private Sub Form_Load()
    ' Execute a simple message box that says "Hello, World!"
    MsgBox "Hello, World!"
End Sub

This snippet makes a counter that moves up 1 every second (a label and a timer control need to be added to the form for this to work) until the form is closed or an integer overflow occurs:

Option Explicit
Dim Count As Integer
Private Sub Form_Load()
    Count = 0
    Timer1.Interval = 1000 ' units of milliseconds
End Sub
Private Sub Timer1_Timer()
    Count = Count + 1
    Label1.Caption = Count
End Sub

See also

[edit]

References

[edit]
  1. ^ "The Classic Visual Basic Programming Language". TIOBE. Retrieved 2023-02-07.
  2. ^ "Classic VB". Visual Studio Magazine. Retrieved 2024-08-29.
  3. ^ "Support Statement for Visual Basic 6.0 on Windows (updated with Windows 10 version 1709 support information)". Microsoft. Retrieved 2015-10-15.
  4. ^ Root, Randal; Romero Sweeney, Mary (2006). A tester's guide to .NET programming. Apress. p. 3. ISBN 978-1-59059-600-5. You can choose a language based on how easy it is to learn. For beginners, Visual Basic is a good choice. [~snip] A big advantage of Visual Basic is that it is a popular language since it is easy to learn.
  5. ^ Plant, Robert T.; Murrell, Stephen (2007). An executive's guide to information technology. Cambridge University Press. p. 343. ISBN 978-0-521-85336-1. Summary of positive issues: Visual Basic is easy to learn and widely available.
  6. ^ a b ISpliter (14 January 2014). "Visual Basic 6.0: A giant more powerful than ever". CodeProject.com. Retrieved 3 April 2014.
  7. ^ "Stack Overflow Developer Survey 2016". Stack Overflow. 2016. Retrieved 2020-12-18.
  8. ^ "Stack Overflow Developer Survey 2017". Stack Overflow. 2017. Retrieved 2020-12-18.
  9. ^ "Stack Overflow Developer Survey 2018". Stack Overflow. 2018. Retrieved 2020-12-18.
  10. ^ violent, ken. "vkControls : 16 GRAPHICALS usercontrols ! NEVER SEEN before!". PSC. Retrieved 5 April 2014.
  11. ^ Krool. "CommonControls (Replacement of the MS common controls)". VBForums. Retrieved 5 April 2014.
  12. ^ PSC. "Visual Basic 6.0 third party components for modern standards (a review)". Planet Source Code. Retrieved 4 April 2014.
  13. ^ Jeff, Martin. "Visual Basic 6 Renewed to Run on Windows 8". INFOQ. Retrieved 5 April 2014.
  14. ^ "Tip 2: Use line numbers in your source code. : Visual Basic".
  15. ^ Microsoft Visual Basic Programmer's Guide Version 3.0 - Microsoft Corporation 1993
  16. ^ "Visual Studio 2003 Retired Technical documentation". Microsoft Download Center. Retrieved 2023-02-07.
  17. ^ Kathleen Dollard; et al. "Loop Structures - Visual Basic". learn.microsoft.com. Retrieved December 4, 2017.
  18. ^ "Microsoft Basic Logical Expression Evaluation". Vb.mvps.org. Archived from the original on 2009-08-23. Retrieved 2009-06-16.
  19. ^ "PRB: Round Function different in VBA 6 and Excel Spreadsheet". Microsoft Support. Archived from the original on 2013-10-29. Retrieved 2014-01-25.
  20. ^ "BASIC Will Be the "Embedded Language" of Microsoft Applications". BYTE. February 1989. p. 12. Retrieved 2024-10-08.
  21. ^ Cooper, Alan (22 April 1996). "Why I am "the father of Visual Basic"". Archived from the original on 9 March 2017. Retrieved 8 March 2017.
  22. ^ "Alan Cooper Receiving the Windows Pioneer Award 1994". YouTube. September 23, 2010. Event occurs at 4:25Bill Gates: "A lot of people have called you the father of Visual Basic. What do you think about that?"{{cite web}}: CS1 maint: postscript (link)
  23. ^ Lohr, Steve (2008). Go To: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Maverick Scientists, and Ico (revised ed.). Basic Books. p. 96. ISBN 9780786730766. Cooper ... gained industry recognition as the "Father of Visual Basic." (Microsoft's lawyers once sent Cooper a cease-and-desist order, demanding that he stop using that title. But after Cooper complained, Gates patched things up and even lauded him as a "Windows Pioneer" at an industry conference.)
  24. ^ "The Birth of Visual Basic". Rian " Petot " Danao I <3 19
  25. ^ George, Mack. "History of Visual Basic". June 2002. George Mack, 3rd edition, Copyright June 2002. Retrieved 10 April 2014.
  26. ^ www.insteptech.com (2005-07-22). "What's new in VB6?". www.insteptech.com.
  27. ^ "Product Family Life Cycle Guidelines for Visual Basic 6.0". Msdn2.microsoft.com. 2005-03-31. Retrieved 2009-06-16.
  28. ^ "Support Statement for Visual Basic 6.0 on Windows". Microsoft. 2018-01-17. Retrieved 2019-06-20.
  29. ^ Halvorson, Michael J. (2020). Code Nation: Personal Computing and the Learn to Program Movement in America. New York, NY: ACM Books. p. 159.
  30. ^ Halvorson, Michael J. (2020). Code Nation: Personal Computing and the Learn to Program Movement in America. New York, NY: ACM Books. p. 159.
  31. ^ Piquet, Lori (2002-02-20). "Abandoning the Fantasy of VB Migration Wizardry". DevX.com. Jupitermedia. Archived from the original on 2007-05-19. Retrieved 2007-05-17.
  32. ^ "VBA for Office Developers". Microsoft.
  33. ^ "Compatibility Between the 32-bit and 64-bit Versions of Office 2010". Microsoft Corporation. Retrieved 16 July 2012.
  34. ^ Alex Homer; Dave Sussman; Rob Howard; Brian Francis; Karli Watson; Richard Anderson (2004). Professional ASP.NET 1.1. Wiley. p. 71. ISBN 0-7645-5890-0. Retrieved 2008-10-08.
  35. ^ Marc D'Aoust (December 2000). "Avoid Writing Tedious, Boring Code". Microsoft. Retrieved 2008-11-10.
  36. ^ Andrew Troelsen (2008). Pro VB 2008 and the .NET 3.5 Platform: The expert's voice in .NET. Apress. p. 5. ISBN 978-1-59059-822-1.
  37. ^ Denning, Adam (2015-06-22). "Getting ready for Windows 10 – SDKs, compatibility, bridges". Building Apps for Windows blog. Retrieved 2015-08-02.
  38. ^ paulyuk. "Support Statement for Visual Basic 6.0". docs.microsoft.com. Retrieved 2022-07-26.
  39. ^ Dan, Brust (14 September 2015). "Installing Visual Basic/Studio 6 on Windows 10". danbrust.net.
  40. ^ Ramel, David (2020-07-07). "Popularity Index: Classic Visual Basic Hangs In There". Retrieved 2023-03-28.
  41. ^ Ramel, David (2020-02-28). "Visual Basic Resurgence? Project Seeks to 'Bring the VBE into This Century!'". Visual Studio Magazine. Retrieved 2023-03-28.
[edit]