Professional Documents
Culture Documents
VB Basics
VB Basics
The computer follows these instructions, one by one, until it reaches the end of the program
VB is a third-generation event-driven programming language and integrated development environment (IDE) from Microsoft released in 1991.
VISUAL BASIC is a high level programming language evolved from the earlier
History
VB 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
called Tripod. 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 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.
Characteristics
Visual Basic has the following traits which differ from C-derived languages: Statements tend to be terminated with keywords such as "End If", instead of using "{}"s to group statements. Multiple variable assignments are not possible. A = B = C does not imply that the values of A, B and C are equal. The Boolean result of "Is B = C?" is stored in A. The result stored in A would therefore be either false or true. Boolean constant True has numeric value 1. This is because the Boolean data type is stored as a 16-bit signed integer. In this construct 1 evaluates to 16 binary 1s (the Boolean value True), and 0 as 16 0s (the Boolean value False). This is apparent when performing a Not operation on a 16 bit signed integer value 0 which will return the integer 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.
[7]
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 again is a traditional feature of BASIC. Variable array base. Arrays are declared by specifying the upper and lower bounds in a
way similar to Pascal and Fortran. It is also possible to use the Option Base statement to set the default lower bound. Use of the Option Base statement can lead to confusion when reading Visual Basic code and is best avoided by always explicitly specifying the lower bound of the array. 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 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.
Visual Basic supports: Standard Windows EXE programs ActiveX EXE files ActiveX DLLs ActiveX controls Programs written by the Visual Basic Application Wizard Data projects Visual Basic add-ins IIS (the Microsoft Internet Information Server) applications ActiveX document DLLs ActiveX document EXE files DHTML applications VB Enterprise Edition controls
8. Which of the following is true ? (a) Logical design is software-dependent (b) In a distributed database, database is stored in one physical location (c) Conceptual design translates the logical design into internal model (d) Logical design is software independent (e) None of these 9. A range check _____ (a) ensures that only the correct data type is entered into a field (b) verifies that all required data is present (c) determines whether a number is within a specified limit (d) tests if the data in two or more associated fields is logical (e) None of these 10. The total set of interlinked hypertext documents worldwide is(a) HTTP (b) Browser (c) WWW (d) B2B (e) None of these 11. With the object-oriented (OO) approach, an object encapsulates, or_____.a programmer. (a) carries out, the details of an object for (b) hides, the details of an object from (c) reveals, the details of an object to (d) extends, the details of an object beyond (e) None of these 12. Every computer connected to an intranet or extranet must have a distinct_____ (a) firewall (b) proxy server (c) IP address (d) domain name (e) None of these 13. A table of bits in which each row represents the distinct values of a key? (a) Join index (b) Bitmap index (c) B + Tree (d) Hierarchical index (e) None of these 14. The degree of detail that should be incorporated into a database depends on what? (a) Data integrity (b) The type of database (c) The user's perspective (d) The business practices and policies (e) None of these 15. The ___.converts digital signals to analog signals for the purpose of transmitting data over telephone lines.
(a) Modem (b) Router (c) Gateway (d) Bridge (e) All of these 16. Before a package can be used in a java program it must be___. (a) executed (b) referenced (c) imported (d) declared (e) None of these 17. Choose the correct way to indicate that a line in a C++ program is a comment line, that is, a line the will not be executed as an instruction___. (a) begin the line with a # sign (b) begin the line with double slashes (/ /) (c) begin and end the line with double hyphens (-_-) (d) indent the line (e) None of these 18. Programming language built into user programs such as Word and Excel are known as____ (a) 4GLs (b) macro languages (c) object-oriented languages (d) visual programming languages (e) None of these 19. Firewalls are used to protect against___. (a) Unauthorized Attacks (b) Virus Attacks (c) Data Driven Attacks (d) Fire Attacks (e) All of these 20. This is a standard way for a Web server to pass a Web user's request to an application program and to receive data back to forward to the user(a) Interrupt request (b) Forward DNS lookup (c) Data-Link layer (d) File Transfer Protocol (e) Common gateway interface 21. Three SQL, DDL, CREATE commands are__. (a) Schema, Base and Table (b) Base, Table and Schema (c) Key, Base and Table (d) Schema, Table and View (e) None of these 22. Data are ________ in client/server computing. (a) never sent to the client machine
(b) sent in very large sections to save processing time (c) sent only upon the client's request (d) sent in complete copies for the client to filter and sort (e) sent from the client to the server for processing 23. Which of the following will not eliminates the ambiguities of a null value? (a) Define the attribute as required (b) Define subtypes (c) Define each attribute as having an initial value that is recognized as blank (d) Define supertypes (e) None of these 24. The____directory is mandatory for every disk. (a) Root (b) Base (c) Sub (d) Case (e) None of these 25. This is a group of servers that share work and may be able to back each other up if one server fails. (a) Channel bank (b) Cluster (c) Tiger team (d) Serverless backup (e) Logical unit