Q.1 Explain Event Driven Programming?

What Does Event-Driven Program Mean?
An event-driven program is one that largely responds to user events or other similar input.
The concept of event-driven programming is an important one in application development and other kinds of programming and has spawned the emergence of event handlers and other resources.

An event-driven program is also known as an event-driven application.

The idea in event-driven programming is that the program is designed to react.

It reacts to specific kinds of input from users, whether it’s a click on a command button, a choice from a drop-down list, an entry into a text box, or other kinds of user events.

Other programming languages may feature user events that are largely delivered through a command-line interface or some other type of user interface. The opposite of event-driven programming would be programming that is written to act regardless of user input.

For example, display apps such as those for weather updates or sports scores may feature less of the event-driven programming that is inherent in other kinds of programs. However, nearly all software relies on user events for functionality, and it would be easy to argue that event-driven programming is the default for nearly all kinds of projects.

That’s because, in general, applications and code modules are written to respond to human actions, which is part of the core concept of how humans work with machines. However, identifying event-driven aspects of programs can be helpful in design analysis.



Q.2 What is data type? Describe all available data type

Data types refer to an extensive system used for declaring variables or functions of different types. The type of a variable determines how much space it occupies in storage and how the bit pattern stored is interpreted.

Data Types in Visual Basic

Data TypeSize
BooleanIt depends on the Platform.
Byte1 byte
Char2 bytes
Date8 bytes
Decimal16 bytes
Double8 bytes
Integer4 bytes
Long8 bytes
Object4 bytes on a 32-bit platform, 8 bytes on a 64-bit platform
SByte1 byte
Short2 bytes


Q.3 Explain the following : (i) Coordinate system (ii) Slider control

(ii) Slider control A Slider Control (also known as a trackbar) is a window containing a slider and optional tick marks. When the user moves the slider, using either the mouse or the direction keys, the control sends notification messages to indicate the change. There are two types of sliders — horizontal and vertical. It is represented by CSliderCtrl class. (i) Coordinate system Besides the fixed global x/y/z coordinate system, a local coordinate system (or working coordinate system WCS) may be active. All geometric operations are performed in the currently active coordinate system. It is also possible to attach a coordinate system to a solid. Such a local solid coordinate system (SCS) is useful for features depending on the orientation of the solid. The SCS is transformed according to transformations performed for the solid, and it is copied when the solid is copied within a transformation.

Q.4 What is Menu Editor ? Explain in detail.

Menu Editor utility of VB can be accessed from Tools menu in the forms design screen. This utility is used for creating menus. It allows you to create custom menus for your application and to define their properties.

Dialog Box Options:
Caption: Allows you to enter the menu or command name that you want to appear on your menu bar or in a menu.
Name: Allows you to enter a control name for the menu item.
Index: Allows you to assign a numeric value that determines the control’s position within a control array.
Shortcut: Allows you to select a shortcut key for each command.
HelpContextID: Allows you to assign a unique numeric value for the context ID.
NegotiatePosition: Allows you to select the menu’s NegotiatePosition property.
Checked: This allows you to have a checkmark appear initially at the left of a menu item.
Right Arrow: Moves the selected menu down one level each time you click it. You can create up to four levels of submenus.
Left Arrow: Moves the selected menu up one level each time you click it. You can create up to four levels of submenus.
Up Arrow: Moves the selected menu item up one position within the same menu level each time you click it.
Down Arrow: Moves the selected menu item down one position within the same menu level each time you click it.

Q.5 What is data control ? How to access database using data control.


The data control is used to connect to the database. Three properties are very necessary to connect to the database. The primary property is the database name. You can put this in the data control property. The syntax is as shown below:

Form.datacontrol.DatabaseName = pathname

The pathname is the position of the database file name. When the database is ex.mdb and the data control is Data1 next to put the DatabaseName property to do the initialization as shown below:

Data1.DatabaseName = “C:\ex.mdb”

The second property is the Connect property. The default is Access. When you click the drop-down list box you’ll examine that you can connect to the Paradox, Lotus, Dbase, Excel, and ODBC. You require to set the Connect property. The third property is a Recordset property. It can be a dyna set type record set table, a table, or a snapshot type record set. The Record Source can be a SQL statement or a table.