Minggu, 10 Juni 2018

Sponsored Links

Is Visual Basic Dead? - Software Quality Blog - SubMain Software
src: i1.wp.com

Visual Basic is a third generation event-driven programming language and integrated development environment (IDE) from Microsoft for the Component Object Model (COM) programming model first released in 1991 and declared legacy for 2008. Microsoft Visual Basic intends to be relatively easy to learn and use. Visual Basic comes from BASIC and enables rapid application development (RAD) from a graphical interface application (GUI), access to databases using Data Access Objects, Remote Data Objects, or ActiveX Data Objects, and creation of ActiveX controls and objects.

A programmer can create applications using components provided by the Visual Basic program itself. Over time, the programmer community develops third party components. Programs written in Visual Basic can also use the Windows API, which requires an external function declaration.

The last release was version 6 in 1998 (now known only as Visual Basic). On April 8, 2008, Microsoft stopped supporting Visual Basic 6.0 IDE. The Microsoft Visual Basic team still maintains compatibility for Visual Basic 6.0 applications on Windows Vista, Windows Server 2008 including R2, Windows 7, Windows 8, Windows 8.1, Windows Server 2012 and Windows 10 through the "It Just Works" program. By 2014, some software developers still prefer Visual Basic 6.0 rather than its successor, Visual Basic.NET. In 2014 some developers are lobbying for a new version of Visual Basic 6.0. In 2016, Visual Basic 6.0 won a technical impact award at The 19th Annual D.I.C.E. Appreciation. A Visual Basic, Visual Basic for Applications (VBA) dialect, used as a macro or scripting language in several Microsoft applications, including Microsoft Office.


Video Visual Basic



Language features

Like the BASIC programming language, Visual Basic is designed for an easy learning curve. Programmers can create simple and complex GUI applications. Programming in VB is a combination of visual regulators or control components on a form, specifying attributes and actions for those components, and writing additional lines of code for more functionality. Because VB defines the default attributes and actions for a component, the programmer can develop a simple program without writing a lot of code. Programs built with previous versions have performance issues, but faster computers and native code compilations have made this less of an issue. Although the VB program can be compiled into native code that can run from version 5, they still require the presence of about 1 MB runtime library. The core runtime library is included by default in Windows 2000 and later, but additional extension component components must still be installed. Earlier versions of Windows (95/98/NT), require that runtime libraries be distributed with executable ones.

Forms are created using the drag-and-drop technique. Tools are used to place controls (for example, text boxes, buttons, etc.) on the form (window). The controls have attributes and event handlers associated with them. The default value is provided when the control is created, but can be changed by the programmer. Many attribute values ​​can be modified during processing time based on user actions or environmental changes, providing dynamic applications. For example, the code can be inserted into the form event to resize the handler to position the control so that it remains centered on the form, expands to fill out the form, etc. By entering the code into the event handler to press the button in the text box, the program can translate the case of text entered automatic, or even prevent certain characters from being inserted.

Visual Basic can create executable files (EXE files), ActiveX controls, or DLL files, but is primarily used for developing Windows applications and for connecting database systems. A dialog box with fewer functions can be used to provide pop-up capabilities. Controls provide the basic functionality of the application, while the programmer can input additional logic in the appropriate event handler. For example, the drop-down combination box automatically displays the list. When the user selects an element, an event handler is called which executes the code that the programmer created to perform an action for that list item. Alternatively, the Visual Basic component can not have a user interface, and instead provides ActiveX objects to other programs via Component Object Model (COM). This enables server side processing or additional modules.

Runtime recovers unused memory using reference counting, which depends on variables that pass through scope or is set to Nothing , avoiding possible memory leak issues in other languages. There is a large library of utility objects, and the language provides basic support for object-oriented programming. Unlike many other programming languages, Visual Basic is generally not case-sensitive - although it converts keywords into standard case configurations and forces case variable names to match the entry cases in the symbol table. Comparison of strings is case sensitive by default. The Visual Basic compiler is shared with other Visual Studio languages ​​(C, C). However, by default the restrictions in the IDE do not allow for the creation of multiple targets (Windows model DLLs) and threading models, but over the years, developers have crossed these limits.

Maps Visual Basic



Characteristics

Visual Basic is built on the characteristics of BASIC.

  • There is no line number as in the previous BASIC, the code is grouped into subroutines or methods: Sub... End Sub .
  • The Statement Code has no terminating character other than the line suffix (feed back/feed line). Versions at least since VB 3.0 allow statements to be implicitly multi-lines with string sequences or explicitly using underscore (_) characters at the end of a line.
  • The comment code is done with apostrof (') one character. ' This is a comment
  • The Looping statement block starts and ends with the keyword: Do... Loop, While... End While, For... Next .
  • Some variable tasks are not possible. A = B = C does not imply that values ​​A, B, and C are equal. The Boolean result of "Is B = C?" stored in A. The results stored in A will be incorrect or true.
  • The Boolean constant True has a numeric value of -1. This is because the Boolean data type is stored as a double integer complement. In this construct, -1 evaluates all-1 in binary (Boolean value True ), and 0 as all-0s (Boolean False ). This is seen when performing the (bitwise) Not operation on both complement values ​​0, which returns the second complementary value -1, in other words True = Not False . This inherent functionality becomes very useful when performing logical operations on individual bits of an integer such as And , Or , Xor and No . This True definition is also consistent with BASIC since the early 1970s, Microsoft BASIC implementation and also related to the characteristics of CPU instruction at the time.
  • Logical and bitwise operators are put together. This is unlike some derived C languages ​​(such as Perl), which have separate logic and bitwise operators. This again is a traditional feature of BASIC.
  • The variable base array. Arrays are expressed by setting the upper and lower bounds in a manner similar to Pascal and Fortran. It is also possible to use the Option Base statement to set a standard lower limit. Use of the Base Options statement may cause confusion when reading Visual Basic code and should be avoided by always explicitly specifying the lower bound of the array. This lower limit is not limited to 0 or 1, because it can also be specified by declaration. In this way, both the lower and upper limits can be programmed. In a more limited-subscript language, the lower bound of the array is not variable. This unusual nature does exist in Visual Basic.NET but not in VBScript.
OPTION BASE was introduced by ANSI, with a standard for ANSI Minimal BASIC in the late 1970s.
  • Relatively strong integration with Windows operating system and Component Object Model. The original types for strings and arrays are special COM types, BSTR and SAFEARRAY.
  • Bankers rounding as default behavior when converting real numbers to integers with the Round function. ? Round (2.5, 0) gives 2, ? Round (3.5, 0) gave 4.
  • Integers are automatically promoted to real in expressions involving normal sharing operators (/) so that the division of one number with another produces intuitively correct results. VB provides the operator of the specified number ( \ ) division.
  • By default, if a variable has not been declared or if no character declaration type is specified, the variable is type Variant . This can be changed with Deftype statements like DefInt , DefBool , DefVar , DefObj , DefStr . There are 12 total Deftype statements offered by Visual Basic 6.0. Default types can be overridden for specific declarations by using special suffix characters in variable names ( # for Double, ! for Single, & amp; for Long , % for Integer, $ for String, and @ for Currency) or use the key phrase As (type) . VB can also be set in a mode that explicitly states only variables can be used with the Option Explicit command.

How to make a maze game in Visual Basic - YouTube
src: i.ytimg.com


History

Visual Basic 1.0 was introduced in 1991. The drag and drop design for creating user interfaces comes from a prototype generator generator developed by Alan Cooper and its company called Tripod . Microsoft contracted with Cooper and his colleagues to develop Tripod into a programmable system for Windows 3.0, under the Ruby code name (nothing to do with the Ruby programming language later on). Tripod does not include any programming language at all. Microsoft decided to combine Ruby with the Basic language to create Visual Basic. The Ruby interface generator provides a visual "part" of Visual Basic, and this is combined with the "EB" Embedded BASIC engine designed for the "Omega" database system Microsoft left behind. Ruby also provides the ability to load dynamic link libraries that contain additional controls (then called "gizmos"), which then becomes the VBX interface.

Timeline

1990s

  • The 'Thunder' base project started in 1990. Thunder survived until the last release of Visual Basic on behalf of the main 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 is not quite compatible with Visual Basic for Windows, as it is the next version of Microsoft's DOS-based BASIC compilation, QuickBASIC and BASIC Professional Development System. The interface uses a text user interface, using extended ASCII characters to simulate the look of the GUI.
  • Visual Basic 2.0 was released in November 1992. The programming environment is easier to use, and the speed is improved. In particular, the form becomes a provable object, thus laying down the basic concept of a class module as it is then offered in VB4.
  • Visual Basic 3.0 was released in the summer of 1993 and comes in Standard and Professional versions. VB3 includes version 1.1 of the Microsoft Jet Database Engine which can read and write Jet (or Access) 1.x databases.
  • Visual Basic 4.0 (August 1995) is the first version that can create 32-bit and 16-bit Windows programs. It has three editions; Standards, Professionals, and Companies. It also introduces the ability to write non-GUI classes in Visual Basic. Incompatibility between different releases of VB4 causes installation and operation problems. While earlier versions of Visual Basic have used VBX controls, Visual Basic now uses OLE controls (with file names ending in.OCX) instead. These are then named ActiveX controls.
  • With version 5.0 (February 1997), Microsoft released Visual Basic specifically for Windows 32-bit versions. Programmers who prefer to write 16-bit programs can import programs written in Visual Basic 4.0 to Visual Basic 5.0, and the Visual Basic 5.0 program can easily be converted to Visual Basic 4.0. Visual Basic 5.0 also introduces the ability to create custom user controls, as well as the ability to compile native Windows execution code, speed up the execution of calculation-intensive code. Creation Controls A free downloadable edition was also released for the creation of ActiveX controls. It is also used as a form of introduction to Visual Basic: regular.exe projects can be created and run in the IDE, but not compiled.
  • Visual Basic 6.0 (Mid-1998) is increasing in a number of areas including the ability to create web-based applications.

2000s

  • Extended support of Visual Basic 6.0 expires in March 2008; however, the main components of the Visual Basic 6 development environment run on all 32-bit Windows versions up to and including 8.1.
  • Mainstream Support for Microsoft Visual Basic 6.0 expires on March 31, 2005. Extended support ends in March 2008. In response, the Visual Basic user community expressed its concern and lobbied the user to sign the petition to keep the product alive until there was no detailed info.

Visual Basic 2015 Lesson 1: Introduction - Visual Basic
src: www.vbtutor.net


Derived languages ​​

Microsoft has developed a Visual Basic instance for use in scripting. Visual Basic itself comes from BASIC, and then has been replaced with the.NET platform version.

Some derived languages ​​are: Visual Basic for Applications (VBA) is included in many Microsoft (Microsoft Office) applications, as well as in many third party products such as SolidWorks, AutoCAD, WordPerfect Office 2002, ArcGIS, Sage 300 ERP, and Desktop Intelligence Business Objects. There is little inconsistency in the way VBA is implemented in different applications, but most of the same language as Visual Basic 6.0 and using the same runtime library. Visual Basic development ended with 6.0, but in 2010 Microsoft introduced VBA 7 to provide additional features and added 64-bit support.

  • VBScript is the default language for Active Server Pages. It can be used in Windows scripting and side-client webpage scripts. 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.
  • Visual Basic.NET is Microsoft's designated replacement for Visual Basic 6.0, and is part of the Microsoft.NET platform. Visual Basic.NET compiles and runs using the.NET Framework. Not compatible with Visual Basic 6.0. Automatic conversion tools exist, but fully automated conversion for most projects is not possible.
  • OpenOffice Basic is a Visual Basic compatible interpreter that comes from a StarOffice office suite.
  • Gambas is a free Visual Basic-inspired software programming language for Linux operating systems. This is not a clone of Visual Basic, but it has the ability to convert Visual Basic programs to Gambas.
  • WinWrap Basic is a third-party VBA variant used with various software, and is available for programmers to use to build macro facilities into their programs.
  • LotusScript is a VBA variant available in Lotus SmartSuite and Lotus Notes.
  • The next version of Corel WordPerfect Office implements access to VBA as one of the macro/scripting languages, the other major is CorelScript and PerfectScript
  • Previous versions of Microsoft Word use a Visual Basic variant called WordBasic

  • TUTORIAL VISUAL BASIC 2010 - DOWNLOAD GRÁTIS E INSTALAÇÃO - YouTube
    src: i.ytimg.com


    Performance and other issues

    Previous versions of Visual Basic (before version 5) compiled the code to P-Code only. P-Code is interpreted by the language runtime. The benefits of P-Code include the portability and size of smaller binary files, but usually slow down the execution, as it has a runtime added an additional layer of interpretation. The Visual Basic application requires Microsoft Visual Basic runtime MSVBVMxx.DLL, where xx is the relevant version number, either 50 or 60. MSVBVM60.dll comes as standard with Windows in all editions from Windows 98 to Windows 7 (some editions of Windows 7 are not included that). However, Windows 95 machines require inclusion with any installer required by the DLL program. Visual Basic 5 and 6 can compile code for either native or P-Code but in both cases the runtime is still needed for built in function and form management.

    Critics addressed in the Visual Basic edition before VB.NET include:

    • The version issue associated with various DLL runtimes, known as "DLL hell"
    • Poor support for object-oriented programming
    • Can only create multi-threaded apps using ActiveX
    • Variant types have greater performance and storage "overhead" than strongly typed programming languages ​​
    • Dependency on Components entry Components are complex and fragile (COM) Registry entries

    Visual Basic 6.0 Download Free - OceanofEXE
    src: oceanofexe.com


    Legacy development and support

    All versions of the Visual Basic development environment from 1.0 to 6.0 have been discontinued by Microsoft in 2008, and therefore are no longer supported. The associated runtime environment is also not supported, except for the Visual Basic 6 core runtime environment, officially supported by Microsoft for Windows 8 and Windows 10 life. Third party components shipped with Visual Studio 6.0 are not included in this support statement. Some components of Visual Basic legacy can still work on newer platforms, although not supported by Microsoft and other vendors. Documentation for Visual Basic 6.0, the application programming interface and its tools are best covered in the last MSDN release prior to Visual Studio.NET 2002. Later the MSDN release focuses on developing.NET and has an important part of the Visual Basic 6.0 programming documentation removed as language evolves, and support for longer end code. Although the vendor support for Visual Basic 6 has ended, and the product has never been supported on the latest version of Windows, the main part of the environment is still working on newer platforms. It is possible to get a subset of development environments that work on 32-bit and 64-bit versions of Windows Vista, Windows 7, Windows 8, and Windows 10.

    Visual Basic For Application - Excel Lesson 1 - YouTube
    src: i.ytimg.com


    Sample code

    The following code snippet displays a message box that says "Hello, World!" when window loads:

    This trailer keeps counters moving up 1 every second (labels and timer controls must be added to the form for this to work) until the form is closed or an excess integer occurs:

    Adding controls to the form in Visual Basic 2017
    src: www.vbtutor.net


    See also

    • IIf - functions in some Visual Basic editions are roughly equivalent to?: conditional operator C and related language.
    • Comparison of programming languages ​​

    Visual Basic 2010 - How To Build The .EXE File - Beginner - YouTube
    src: i.ytimg.com


    References


    Visual Basic 2015 Lesson 1: Introduction - Visual Basic
    src: www.vbtutor.net


    External links

    • Visual Basic 6.0 Resource Center
    • Secure your Visual Basic 6.0 investment with Microsoft.NET: Migrating from Visual Basic 6.0 to Visual Basic 2008
    • Visual Basic 6 Was Updated to Run on Windows 8

    Source of the article : Wikipedia

    Comments
    0 Comments