Visual Basics Interview Questions & Answers

  1. Question 1. How Do You Register A Component?

    Answer :

    Compiling the component, running REGSVR32 MyDLL.dll

  2. Question 2. What Does Option Explicit Refer To?

    Answer :

    All variables must be declared before use. Their type is not required.

  3. Pascal programming Interview Questions

  4. Question 3. What Are The Different Ways To Declare And Instantiate An Object In Visual Basic 6?

    Answer :

    Dim obj as OBJ.CLASS
    Set obj = New OBJ.CLASS
                   or
    Set obj = CreateObject (“OBJ.CLASS”)

  5. Question 4. Name The Four Different Cursor Types In Ado And Describe Them Briefly.

    Answer :

    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.

  6. Pascal programming Tutorial

  7. Question 5. Name The Four Different Locking Type In Ado And Describe Them Briefly.

    Answer :

    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.

  8. MS Access Interview Questions

  9. Question 6. What Are The Ado Objects? Explain Them. Provide A Scenario Using Three Of Them To Return Data From A Database.

    Answer :

    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.

  10. Question 7. List Out Controls Which Does Not Have Events

    Answer :

    shape, line controls

  11. MS Access Tutorial
    VB.NET Interview Questions

  12. Question 8. To Set The Command Button For Esc, Which Property Has To Be Changed ?

    Answer :

    Cancel

  13. Question 9. What Is Ole Used For ?

    Answer :

    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.

  14. VBA For Excel Interview Questions

  15. Question 10. Which Controls Have Refresh Method?

    Answer :

    Checkbox, comna, combo, list, picture, ADo control, Data,Datagrid, Datareport,Dir list biox, filelistbox etc.

  16. VB.NET Tutorial

  17. Question 11. Early Binding Vs Late Binding – Define Them And Explain?

    Answer :

    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.Application

    Late 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 Object

    set ex =CreateObject(“Excel.Application”)

  18. ASP.NET Interview Questions

  19. Question 12. Can I Send Keystrokes To A Dos Application?

    Answer :

    AppActivate (”C:windowssystem32cmd.exe”) ‘ Appilcation caption
    SendKeys (”SA”) ’For sending one string
    SendKeys “% ep”, 1 ’ For sending Clipboard data to Dos 

  20. Pascal programming Interview Questions

  21. Question 13. How Do I Make A Menu Popup From A Commandbutton

    Answer :

    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

  22. VBA For Excel Tutorial

  23. Question 14. What Is Option Base Used For In Vb6 ?

    Answer :

    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.

  24. Question 15. How To Copy Text To The Windows Clipboard And From It.

    Answer :

    Clipboard.SetData and Clipboard.GetData

  25. Fox Pro Interview Questions

  26. Question 16. Which Method Of Recordset Is Used To Store Records In An Array.

    Answer :

    getrows

  27. ASP.NET Tutorial

  28. Question 17. What Is The Default Property Of Datacontrol?

    Answer :

    Caption

  29. Tableau Interview Questions

  30. Question 18. Which Property Of Textbox Cannot Be Changed At Runtime

    Answer :

    Alignment property, Tab Index etc

  31. MS Access Interview Questions

  32. Question 19. Describe In Process And Out Of Process Component?

    Answer :

    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

  33. Tableau Tutorial

  34. Question 20. Under The Ado Command Object, What Collection Is Responsible For Input To Stored Procedures?

    Answer :

    The Parameters collection. 

  35. VB Script Interview Questions

  36. Question 21. What Is The Differences Between Flexgrid And Dbgrid Control?

    Answer :

    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.

  37. Question 22. What Are Different Types Of Activex Components Available In Vb 6.0 ?

    Answer :

    Standard EXE, ActiveX EXE, ActiveX DLL, ActiveX document, and ActiveX Control.

  38. VB Script Tutorial

  39. Question 23. How May Type Of Controls Are Available In Vb6 ?

    Answer :

    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.

  40. Advanced C# Interview Questions

  41. Question 24. Describe Inprocess And Out Of Process ?

    Answer :

    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.

  42. VB.NET Interview Questions

  43. Question 25. What Is The Difference Between Image And Picture Box Controls?

    Answer :

    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.

  44. Question 26. What Is The Difference Between A Function And A Sub (method) ?

    Answer :

    Function always return a value, wheras am method may or may not return value.

  45. Visual Source Safe Interview Questions

  46. Question 27. What Is The Default Property Of Datacontrol ?

    Answer :

    Connect property

  47. VBA For Excel Interview Questions

  48. Question 28. What Are Different Types Of Recordset Available In Ado ?

    Answer :

    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.

  49. Question 29. What Is The Difference Between Listbox And Combo Box?

    Answer :

    Both are display list of items, however in combo box user can edit the item.

  50. Question 30. What Is The Difference Modal And Moduless Window?

    Answer :

    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.

  51. Question 31. What Is The Object And Class?

    Answer :

    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.

  52. Question 32. How Objects On Different Threads Communicate With One Another?

    Answer :

    Processes communicate with one another through messages, using Microsoft’s Remote Procedure Call (RPC) technology to pass information to one another.

  53. Question 33. What Is The Query Unload And Unload Event In Form?

    Answer :

    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.

  54. ASP.NET Interview Questions

  55. Question 34. What Are Different Locking Type Available In Ado.

    Answer :

    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.

  56. Question 35. Name Different Ado Objects?

    Answer :

    a) Connection
    b) Command
    c) Recordset
    d) Field

  57. Question 36. What Is The Difference Between A Property Let And Property Set ?

    Answer :

    Let used to set value for ordinary variable and Set used to set value for object variable.

  58. Fox Pro Interview Questions

  59. Question 37. What Is The Difference In Passing Values Byref Or Byval To A Procedure?

    Answer :

    a) ByRef -pass the address of variable not value
    b) ByVal – pass the value 

  60. Question 38. What Is Autoredraw Event Of Form And Picturebox ?

    Answer :

    Automatically redraw the outputs.

  61. Question 39. What Is Doevents?

    Answer :

    DoEvents command tell program control to execute other commands, while executing long task.

  62. Question 40. What Is The Size Of The Variant Data Type?

    Answer :

    16 bytes

  63. Tableau Interview Questions