VB Questions (General)
Dim x, y as integer. What is x and y data type?
X as variant and y as integer.
What is the size of the variant data type?
Variant variable size = 22 + Actual data type size.
What is the return type of Instr and Strcmp?
Instr integer (Numeric position)
Strcmp - integer ( if
both the string are equal they result = 0)
Strcmp (Str1, Str2,
Comparing mode = 0 Binary Comparing
1 Textual Comparing
What is the max size allowed for Msgbox Prompt and Input
Max label caption length.
Max Text box length
Max Control Names length
Extension in Visual Basic
cls, res, vbx, ocx, frx, vbp, exe
What is frx?
When some controls like
grid and third party control placed in our application then it will create frx
in run time.
Name some date function
Datediff(), Datepart(), Cdate()
what will be the result for
3.75 and 15\4 = 3
What is keyword used to compare to objects?
ISOperator Returns Boolean.
How many procedures are in VB?
function and sub procedures (Ask what is the diff. Between them?)
Where will we give the option explicit keyword and for what?
In the general declarations section. To trap undeclared
What is Friend Variable?
What is binding? What are types of binding?
Assigning variable with defined memory space.
Binding - Memory size is allotted in later stage.
Ex:- Dim x as
Early Binding - Memory size is allotted while declaring
New Key word is important.
Ex:- Dim x as New
What is the difference between Property Get, Set and Let.
Let Value is assigned to ActiveX Object from the
Let Value is retried to ActiveX Object from the form.
What is Mask Edit and why it is used?
Control. Restricted data input as well as formatted data
Drag and Drop state numbers and functions.
State 0 Source control is being dragged with the range of
1 Out of the range of a target.
2 One positon in the
target to another.
What are the type of validation available in VB?
With in the form we want to check all the text box control are typed or
For each currentcontrol in
if typeof currentcontrol is TextBox then
What is the result of Null * Any value = 0 (Zero).
What is control array and How many we can have it with in the
Group of control share the same name.
Max 32, 767.
What is the default model of the form? And what is it number?
VbModaless 0 (Zero) We can able to place another window above
Suppose from form1 to form2 object property settings will arise to ?
Invalid procedure call or argument (Run
time error 5)
What is the diff between the Std and Class Module?
Std Global with in the project. Cls Global through out the all
project only thing is we want to set the type lib. Class Modules can be
Different type of Instantiation?
Only for the Specific Module.
Public not creatable Private
Multi Use - Variable we have to declare.
Use Not possible through dll.
Global Multiuse Have variable
not Required to Declare.
Global Single Use - " Only for exe.
How to declare Dll Procedure?
function "<Function Name>" lib "<Lib Name>" Alias "<Alias
..) as Return type.
What is MDI form? MDI Styles?
have only one MDI form for a project. Multiple Document Interface.
This form type is VBModal. We have set the Child property of the forms to
True to place forms inside this MDI.
Style availables 1. VbCascade 2.
How many images can be placed in the image list ?
What is Inprocess and Out of Process?
Inprocess It will run with in the memory. ( Local
Out of Process It will run out of the memory Normally in
the server side.
Diff type of Datatypes?
Object Data type).
CLOB (Stores Character Objects).
BLOB ( Store Binary
Objects such as Graphic, Video Chips and Sound files).
pointers to LOB It may Contain filename for photos store on
What is Zorder Method?
1 or 0 Place a Specified mdiform form or control at the font or back of the
z-order with n its Graphical Level.
What is diff between the Generic Variable and Specific
Generic Variable: Create Object Ex:-Ole-Automation . No need
refer the object library.
Procedure Early and Late Binding ( Can be Remove from the
What are properties available in Clip Board?
No Properties Available. Only the methods they are SetText,
GetText, Setdata(), Getformat(), Clear.
What is Dll?
Libraries of procedures
external to the application but can be called from the
What is Tabstrip control? What is the starting Index value?
How to locate it?
It is tab control to
place our controls with in the form in multiple sheets.
Index starts with
1. And to identify
If Tabstrip1.SelectedItem.Index = 1
Why we use Treeview Control?
the hierarchial list of the node objects. Such of files and
Why we need OLE-Automation?Advantages?
Enables an application to exposes objects and methods to
No need to reserve memory. No need to write functions.
Object library that simplify programming tasks. i.e., No need to Object
library. (OLB, TLB).
What is the diff between the Create Object and Get object?
Create Object - To create an instance of an
Get Object To get the reference to an existing
Have you create Properties and Methods for your own
Properties Public variable of a
Method Public procedure of a class
What is Collection Objects?
to arrays but is preferred over an array because of the following
1. A collection objects uses less Memory than an array.
It provides methods to add and delete members.
3. It does not required
reason statement when objects are added or deleted.
4. It does not have
What is Static Variable?
Its Scope will
be available through out the life time.
Private Dim x as integer.
cannot be used in front of DIM.
What is Implicit?
Instance of specific
copy of a class with its own settings for the properties defined in that
Note: The implicity defined variable is never equal to nothing.
What are the scope of the class?
, private, Friend
Can we able to set Instancing properties like Singleuse, GlobalSingleuse
In project properties if we set Unattended what is it
This cannot have user interface. This
can be used for the COM creation.
What are the Style Properties of Combo Box?
Simple, Dropdown list We can type and select.
Compo Only Drop Down.
What are the Style properties of List Box?
Simple Single Select , Extended. Multiple
What are the different type of Dialog Box?
Predefined, Custom, User Defined.
What is Parser Bug?
It is difficult to
use database objects declared in a module from within a
What is the Dll required for running the VB?
Can We create CGI scripts in VB?
How to change the Mouse Pointer?
How to check the condition in Msgbox?
If(Msgbox("Do you want to delete this
Record",VbYesNo)=VbYes)Then End if