Visual Basic interview questions

  1. How do you center a form?
  2. Can I send keystrokes to a DOS application?
  3. Convert an RGB value to a long, or a long to RGB.
  4. Implement smooth scrolling for either text, graphics or controls across a form.
  5. Implement some quick and easy encryption (can be something primitive).
  6. 4 different types of sorts: advantages and disadvantages.
  7. Compute CRC32 checksum, write a quick piece of code that accepts the packet of data and returns the CRC.
  8. How do you use the Mouse OFF event?
  9. How do I call Windows Help files from a VB program?
  10. How do I create a textbox that lets you insert tabs?
  11. How do I make text box that displays asterisks when the user types in data such as password?
  12. How do I create multi-column combo box?
  13. How do I make a menu popup from a CommandButton?
  14. How to create menus at run time in VB?
  15. Write a generic error handling routine.
  16. How to copy text to the Windows clipboard and from it.
  17. How can I call a Command button without clicking it?
  18. Write a simple app with Encrypt and Decrypt buttons and Textbox where the user can enter text for encryption and decryption.
  19. 3 main differences between flexgrid control and dbgrid control
  20. ActiveX and Types of ActiveX Components in VB
  21. Advantage of ActiveX Dll over ActiveX Exe .
  22. Advantages of disconnected recordsets . Benefit of wrapping database calls into MTS transactions 6. Benefits of using 23 MTS
  23. Can database schema be changed with DAO, RDO or ADO?
  24. Can you create a tabletype of recordset in Jet-connected ODBC database engine?
  25. Constructors and destructors
  26. Controls which do not have events
  27. Default property of datacontrol
  28. Define the scope of Public, Private, Friend procedures?
  29. Describe Database Connection pooling relative to MTS
  30. Describe: In of Process vs. Out of Process component. Which is faster?
  31. Difference between a function and a subroutine, Dynaset and Snapshot, early and late binding, image and picture controls, linked object and embedded Object,listbox and combo box,Listindex and Tab index,modal and moduless window, Object and Class, query unload and unload in form, declaration and instantiation of an object?
  32. Draw and explain Sequence Model of DAO
  33. How can objects on different threads communicate with one another?
  34. How can you force new objects to be created on new threads?
  35. How does a DCOM component know where to instantiate itself?
  36. How do I register a component?
  37. How do I set a shortcut key for label?
  38. What kind of components can be used as DCOM servers?
  39. Name of the control used to call a Windows application
  40. Name the four different cursor and locking types in ADO and describe them briefly
  41. Need of zorder method, no of controls in form, Property used to add a menus at runtime, Property used to count number of items in a combobox,resize a label control according to your caption.
  42. Return value of callback function, The need of tabindex property
  43. Thread pool and management of threads within a thread pool
  44. To set the command button for ESC, Which property needs to be changed?
  45. Type Library and what is it’s purpose?
  46. Types of system controls, container objects, combo box
  47. Under the ADO Command Object, what collection is responsible for input to stored procedures?
  48. What are the ADO objects? Explain them.
  49. What are the different compatibility types when we create a COM component?
  50. What do ByVal and ByRef mean and which is the default?
  51. What does Option Explicit refer to? 36. What does the Implements statement do?
  52. What is OLE and DDE? Explain.
  53. What is the difference between Msgbox Statement and MsgboxQ function?
  54. What keyword is associated with raising system level events in VB?
  55. What methods are called from the ObjectContext object to inform MTS that the transaction was successful or unsuccessful?
  56. What types of data access have you used.
  57. What was introduced to Visual Basic to allow the use of Callback Functions?
  58. Which controls can not be placed in MDI?
  59. Which controls have refresh method, clear method
  60. Which Property is used to compress a image in image control?
  61. Which property of menu cannot be set at run time?
  62. Which property of textbox cannot be changed at runtime?
  63. What is the maximum size of a textbox?
  64. Which tool is used to configure the port range and protocols for DCOM communications?
This entry was posted in VB. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

65 Comments on Visual Basic interview questions

  1. Siva
    Posted 1/19/2007 at 4:50 am | Permalink

    50. What do ByVal and ByRef mean and which is the default?

    There is wrong answer given by Joe Gakenheimer.
    The correct answer is:
    Byref is the default.

    Both are used to pass values to called function or sub routine.
    Changing the value of Byval variables in called funtion will not have any effect in calling piece of code.

    Where in Byref is a sending a memory reference.
    Change of byref variable, subsequently changes every where.

  2. Rajiv Jain
    Posted 2/27/2007 at 1:53 am | Permalink

    For Quest 63:

    The maximum length of a text box is 65535……..

  3. G.Shankar
    Posted 3/3/2007 at 12:44 am | Permalink

    51. Option Explicit enforces the user to declare all the variables explicitly

  4. G.Shankar
    Posted 3/3/2007 at 12:48 am | Permalink

    13. command1_click

    Popupmenu menuname

    endsub

  5. shameera sherule
    Posted 3/9/2007 at 2:20 am | Permalink

    Q.17 How can I call a Command button without clicking it
    ?
    1 if we give & sing in caption of commd button we can call it my pressing Alt+charecter followed by & sign.
    eg :if caption of command button is ‘&Close’ we can call it my useing Alt+c.

  6. Pradip
    Posted 7/6/2007 at 7:04 am | Permalink

    Create Text Box on runtime?

    Set myTextBox = form1.Controls.Add”VB.textBox”, “Text1″, Form1)
    myTextBox.Visible = True
    myTextBox.ZOrder 0

  7. Pradip
    Posted 7/6/2007 at 7:36 am | Permalink

    How do I set a shortcut key for label?

    Private Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
    Label1.Caption = “Hello”
    Label1.ToolTipText = “Please Press Enter”
    Else
    Label1.Caption = “Bye”
    Label1.ToolTipText = “Please Press Enter”
    End If
    End Sub

  8. sneha
    Posted 8/6/2007 at 4:11 am | Permalink

    51 Ans
    SetComplete
    SetAbort

  9. sneha
    Posted 8/6/2007 at 4:13 am | Permalink

    55. Ans.
    Successful
    ObjectContext.SetComplete
    UnSuccessful
    ObjectContext.SetAbort

  10. Namadev
    Posted 8/7/2007 at 4:00 am | Permalink

    23 : Can database schema be changed with DAO, RDO or ADO?

    Logically speaking, we cannot alter the database schema , Since altering the schema affects the connection properties.

  11. Namadev
    Posted 8/7/2007 at 4:03 am | Permalink

    Constructors and destructors ?

    Constructors are the methods which have the same name as of the class and have no return type. These basically are used to initialize instance variables, and do some basic operations . Are called when creating the instance.

  12. Sankar Roy
    Posted 9/1/2007 at 4:05 am | Permalink

    Here is a tip that I had to search for a long time. To click required tabs in a tabbed dialog (say ssTab1) use this code in a click event of a button or whaterve:

    ‘Code :

    ssTab1.Tab=2 ‘(i.e the third tab)

  13. Joe Gakenheimer
    Posted 11/2/2007 at 2:24 pm | Permalink

    ByRef is the default in VB6 and below. ByValue is default in VB.Net.
    http://www.dotnet247.com/247reference/msgs/40/202030.aspx

  14. swati
    Posted 11/6/2007 at 6:54 am | Permalink

    Which controls can not be placed in MDI?
    Answer is :text box,command button,dir,drive,file listbox are not be placed in mdi form

  15. Sachin M
    Posted 1/10/2008 at 3:54 am | Permalink

    Q: Which controls can not be placed in MDI?
    A: Controls without Align property cannot be placed in MDI form.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*