-
1. How Do You Register A Component?
Compiling the component, running REGSVR32 MyDLL.dll
-
2. What Does Option Explicit Refer To?
All variables must be declared before use. Their type is not required.
-
3. What Are The Different Ways To Declare And Instantiate An Object In Visual Basic 6?
Dim obj as OBJ.CLASS
Set obj = New OBJ.CLASS
or
Set obj = CreateObject (“OBJ.CLASS”) -
4. Name The Four Different Cursor Types In Ado And Describe Them Briefly.
Forward Only:
Fastest, can only move forward in recordset.
Static:
Can move to any record in the recordset. Data is static and never changes.
KeySet:
Changes are detectable, records that are deleted by other users are unavailable, and records created by other users are not detected
Dynamic:
All changes are visible. -
5. Name The Four Different Locking Type In Ado And Describe Them Briefly.
LockPessimistic: Locks the row once after any edits occur.
LockOptimistic: Locks the row only when Update is called.
LockBatchOptimistic: Allows Batch Updates.
LockReadOnly: Read only. Can not alter the data. -
6. What Are The Ado Objects? Explain Them. Provide A Scenario Using Three Of Them To Return Data From A Database.
Connection:
Used to make a connection between your app and an external data source, ie, sql server
Command:
Used to build queries, including user-specific parameters, to access records from a data source
Recordset:
Used to access records returned from an SQL query. With a recordset, you can navigate returned records. You can also add, modify or delete records. -
7. List Out Controls Which Does Not Have Events
shape, line controls
-
8. To Set The Command Button For Esc, Which Property Has To Be Changed ?
Cancel
-
9. What Is Ole Used For ?
Object linking and embedding, for using to other object classes like word, excel , autocad objects in our own applications, only thing we have to add reference for these objects.
-
10. Which Controls Have Refresh Method?
Checkbox, comna, combo, list, picture, ADo control, Data,Datagrid, Datareport,Dir list biox, filelistbox etc.
-
11. Early Binding Vs Late Binding – Define Them And Explain?
Early binding allows developers to interact with the object’s properties and methods during coding permits the compiler to check your code. Errors are caught at compile time. Early binding also results in faster code
Eg : Dim ex as new Excel.ApplicationLate binding on the other hand permits defining generic objects which may be bound to different objectsyou could declare myControl as Control without knowing which control you will encounter. You could then query the Controls collection and determine which control you are working on using the TypeOf method and branch to the section of your code that provides for that type
Eg : Dim ex as Objectset ex =CreateObject(“Excel.Application”)
-
12. Can I Send Keystrokes To A Dos Application?
AppActivate (”C:windowssystem32cmd.exe”) ‘ Appilcation caption
SendKeys (”SA”) ’For sending one string
SendKeys “% ep”, 1 ’ For sending Clipboard data to Dos -
13. How Do I Make A Menu Popup From A Commandbutton
Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
PopupMenu Menuname
End If
End Sub -
14. What Is Option Base Used For In Vb6 ?
Option Base is to set the Index of the Array to start from 0 or 1.Like option explicit.. declare “Option base 1″ at the top. now the array will start from Index By default the index starts from 0.
-
15. How To Copy Text To The Windows Clipboard And From It.
Clipboard.SetData and Clipboard.GetData
-
16. Which Method Of Recordset Is Used To Store Records In An Array.
getrows
-
17. What Is The Default Property Of Datacontrol?
Caption
-
18. Which Property Of Textbox Cannot Be Changed At Runtime
Alignment property, Tab Index etc
-
19. Describe In Process And Out Of Process Component?
In-process component is implemented as a DLL, and runs in the same process space as its client app, enabling the most efficient communication between client and component. An out of process component is implemented as an EXE, and unlike a dll, runs in its own process space. As a result, exe’s are slower then dll’s because communications between client and component must be marshalled across process boundaries
-
20. Under The Ado Command Object, What Collection Is Responsible For Input To Stored Procedures?
The Parameters collection.
-
21. What Is The Differences Between Flexgrid And Dbgrid Control?
Microsoft FlexGrid (MSFlexGrid) control displays and operates on tabular data. It allows programmatically sort, merge, and format tables containing strings and pictures. DBgrid is A spreadsheet-like bound control that displays a series of rows and columns representing records and fields from a ADO Recordset object.
-
22. What Are Different Types Of Activex Components Available In Vb 6.0 ?
Standard EXE, ActiveX EXE, ActiveX DLL, ActiveX document, and ActiveX Control.
-
23. How May Type Of Controls Are Available In Vb6 ?
Intrinsic controls – Default controls of VB6, These control are always available in VB6 Toolbox.
ActiveX controls – .These are extra controls which can be added into toolbox and this control having separate files (.ocx). Must be deployed separately along with application in other system.
-
24. Describe Inprocess And Out Of Process ?
An in-process component is implemented as a DLL called ActiveX DLL, and runs in the same process space as its client app, enabling the most efficient communication between client and component. Each client app that uses the component starts a new instance of it.
An out of process component is implemented as an EXE called ActiveX EXE, and unlike a dll, runs in its own process space. As a result, exe’s are slower then dll’s because communications between client and component must be marshalled across process boundaries. A single instance of an out of process component can service many clients.
-
25. What Is The Difference Between Image And Picture Box Controls?
The sizing behavior of the image control differs from that of the picture box. It has a Stretch property while the picture box has an AutoSize property. Also picture box is a container control and support most of the graphics method.
-
26. What Is The Difference Between A Function And A Sub (method) ?
Function always return a value, wheras am method may or may not return value.
-
27. What Is The Default Property Of Datacontrol ?
Connect property
-
28. What Are Different Types Of Recordset Available In Ado ?
a) Table-type Recordset – Hold records from single table and can add, edit and delete.
b) Dynaset-type Recordset – Can hold editable records from multiple tables.
c) Snapshot-type Recordset – Hold read only records from multiple tables,
d) Forward-only-type Recordset – Hold read only records from multiple tables without cursor.
e) Dynamic-type Recordset -Holds editable records from multiple tables and changes done by other user also visible. -
29. What Is The Difference Between Listbox And Combo Box?
Both are display list of items, however in combo box user can edit the item.
-
30. What Is The Difference Modal And Moduless Window?
A modal form has exclusive focus in that application until it is dismissed. Moduless form are not required exclusive focus and it is default when we show any form.
-
31. What Is The Object And Class?
Class is template from we can create objects, Objects are instantiate of a class. For example car is a class and Maruti 800, Maruti Zen are objects of car class.
-
32. How Objects On Different Threads Communicate With One Another?
Processes communicate with one another through messages, using Microsoft’s Remote Procedure Call (RPC) technology to pass information to one another.
-
33. What Is The Query Unload And Unload Event In Form?
Query unload event occurs in a first and then unload event occurs, in MDI form we can trac child form closing status by using this event.
-
34. What Are Different Locking Type Available In Ado.
a) LockPessimistic – Locks the row once after any edits occur.
b) LockOptimistic – Locks the row only when Update is called.
c) LockBatchOptimistic – Allows Batch Updates.
d) LockReadOnly – Read only. Cannot alter the data. -
35. Name Different Ado Objects?
a) Connection
b) Command
c) Recordset
d) Field -
36. What Is The Difference Between A Property Let And Property Set ?
Let used to set value for ordinary variable and Set used to set value for object variable.
-
37. What Is The Difference In Passing Values Byref Or Byval To A Procedure?
a) ByRef -pass the address of variable not value
b) ByVal – pass the value -
38. What Is Autoredraw Event Of Form And Picturebox ?
Automatically redraw the outputs.
-
39. What Is Doevents?
DoEvents command tell program control to execute other commands, while executing long task.
-
40. What Is The Size Of The Variant Data Type?
16 bytes
Pascal programming Interview Questions
Pascal programming Tutorial
MS Access Interview Questions
MS Access Tutorial
VB.NET Interview Questions
VBA For Excel Interview Questions
VB.NET Tutorial
ASP.NET Interview Questions
Pascal programming Interview Questions
VBA For Excel Tutorial
Fox Pro Interview Questions
ASP.NET Tutorial
Tableau Interview Questions
MS Access Interview Questions
Tableau Tutorial
VB Script Interview Questions
VB Script Tutorial
Advanced C# Interview Questions
VB.NET Interview Questions
Visual Source Safe Interview Questions
VBA For Excel Interview Questions
ASP.NET Interview Questions
Fox Pro Interview Questions
Tableau Interview Questions