Вы находитесь на странице: 1из 40

TechInterviews.

com - Interview questions for tech companies


Questions to ask VB programmer
1. 3 main differences between flexgrid control and dbgrid control 2. ActiveX and Types of ActiveX Components in VB 3. Advantage of ActiveX Dll over Active Exe 4. Advantages of disconnected recordsets 5. Benefit of wrapping database calls into MTS transactions 6. Benefits of using MTS 7. Can database schema be changed with DAO, RDO or ADO? 8. Can you create a tabletype of recordset in Jet - connected ODBC database engine? 9. Constructors and distructors 10. Controls which do not have events 11. Default property of datacontrol 12. Define the scope of Public, Private, Friend procedures? 13. Describe Database Connection pooling relative to MTS 14. Describe: In of Process vs. Out of Process component. Which is faster? 15. 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 Tabindex,modal and moduless window, Object and Class,Query unload and unload in form, Declaration and Instantiation an object? 16. Draw and explain Sequence Modal of DAO 17. How can objects on different threads communicate with one another? 18. How can you force new objects to be created on new threads? 19. How does a DCOM component know where to instantiate itself? 20. How to register a component? 21. How to set a shortcut key for label? 22. Kind of components can be used as DCOM servers 23. Name of the control used to call a windows application 24. Name the four different cursor and locking types in ADO and describe them briefly 25. 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. 26. Return value of callback function, The need of tabindex property 27. Thread pool and management of threads within a thread pool 28. To set the command button for ESC, Which property needs to be changed? 29. Type Library and what is its purpose? 30. Types of system controls, container objects, combo box 31. Under the ADO Command Object, what collection is responsible for input to stored procedures? 32. VB and Object Oriented Programming 33. What are the ADO objects? Explain them. 34. What are the different compatibility types when we create a COM component? 35. What do ByVal and ByRef mean and which is the default? 36. What does Option Explicit refer to? 37. What does the Implements statement do? 38. What is OLE and DDE? Explain. 39. What is the difference between Msgbox Statement and MsgboxQ function?

40. What keyword is associated with raising system level events in VB? 41. What methods are called from the ObjectContext object to inform MTS that the transaction was successful or unsuccessful? 42. What types of data access have you used. 43. What was introduced to Visual Basic to allow the use of Callback Functions? 44. Which controls can not be placed in MDI? 45. Which controls have refresh method, clear method 46. Which Property is used to compress a image in image control? 47. Which property of menu cannot be set at run time? 48. Which property of textbox cannot be changed at runtime and Whats the maximum size of a textbox? 49. Which tool is used to configure the port range and protocols for DCOM communications? Categories: VB | Basic database interview quesitons Simple Java questions | All categories: .NET | C++ | Database | General | Hardware | Java | Networking | SAP ABAP | Testing | Unix/Linux | VB | Web dev | Windows

22 Responses to Questions to ask VB programmer


1. Pramod Said: September 25th, 2005 1:14 am Question asked to me in interview: 1) Assume i have created a dll in c++ which doesnt have any class. It only have one function. How can i call that function in VB. 2) What is control array and maximum limit of control array. 3) Which one you will prefer for working with databases - OLEDB or ADOs and why. 4) What is the difference between Active X DLL & Active X Exe. 2. Prema Said: October 6th, 2005 5:31 am What are Disconnected Recordsets? Advantages? The ADO has the ability to work offline with recordsets. The ADO Maintains the informations such as Database name,Server in which the database reside,username and password etcAfter loacting a recordset it disconnects and work with them and finally send it back to the database by re-establishing the connection by making use of the already stored informations about the connetion and the database. Advantage: Minimizes the Load on the SErver 1.what is MTS?? 2.Types of ActiveX Objects and Components??? is there any difference between both these??? 3. Jitendra Singh Bhaskar Said: October 21st, 2005 1:44 am respected Sir/madam i am jitendra Singh Bhaskar.Student of B.Sc(I.T) in Sikkim Manipal University. i have aproblem with some question of Visual basic .I am not able to define it. please solve my question.

i am very glad to you thanking you jitendra singh bhaskar Q-Write an event procedure to check whether the given string is Palindrome or not. Q-Explain the different control structures by giving syntax and one suitable example for each: 1)ForNext Loop. 2)Select Case Statement 3)Do While Loop 4. SHAILA Said: December 22nd, 2005 2:07 am Respected Sir/Madam,i have a doubt from VB . 1.what is the purpose of Visual Source safe in MicroSoft Visual Studio? 2.What is the difference between datagrid and flex grid control? 3.Explain MTS? 4.What is the different between crystal report and data report? 5.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. 5. rakesh kumar Said: February 20th, 2006 5:36 am Respected Sir/Madam,i have a doubt from VB . 1.what is the purpose of Visual Source safe in MicroSoft Visual Studio? 2.What is the difference between datagrid and flex grid control? 3.Explain MTS? 4.What is the different between crystal report and data report? 5.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. 6. rakesh kumar Said: February 20th, 2006 5:48 am respected sir i have some question 1. what is difference betn db grid and flexgrid 2.how to call astored procedure in ado. 3.what is query unload 4.instancing property of dll. 7. shailesh Said: April 9th, 2006 2:51 pm 1) Which of the following has the highest order of precedence? a. Functions and Parenthesis

b. Multiplication, Division and Exponents c. Addition and Subtraction d. Logical Operations 3) When designing a database table, how do you avoid missing column values for non-primary key columns? a. Use UNIQUE constraints b. Use PRIMARY KEY constraints c. Use DEFAULT and NOT NULL constraints d. Use FOREIGN KEY constraints e. Use SET constraints 4)Which of the following is the syntax for creating an Index? a. CREATE [UNIQUE] INDEX index_name OF tbl_name (index_columns) b. CREATE [UNIQUE] INDEX OF tbl_name (index_columns) c. CREATE [UNIQUE] INDEX ON tbl_name (index_columns) d. CREATE [UNIQUE] INDEX index_name ON tbl_name (index_columns) 8) Which of the following is not a valid character datatype in SQL Server? a. BLOB b. CHAR c. VARCHAR d. TEXT e. VARTEXT 11) Which of the following statements about SQL Server comments is false? a. /* */ are used for multiline comments b. // is used for single line comments c. is used for single line comments d. Nested comments are allowed i.e. /* comment 1 /* comment 2 */ comment 1*/ e. is used for single line comments 15) Consider the following transaction code: Begin Transaction Update names_table set employee_name = Ramesh where employee_name = Mahesh Save Transaction SAVE_POINT Update salaries set salary=salary + 900 where employee_job = Engineer Rollback transaction Commit transaction What will be the result produced by this transaction?

a. Ramesh will be updated to Mahesh, but salaries of engineers will not be updated b. Neither Ramesh will be updated to Mahesh, nor the salary of engineers will be updated. c.Ramesh will be updated to Mahesh and salary of engineers will also be updated. 16) Which of the following constraints can be used to enforce the uniqueness of rows in a table? a. DEFAULT and NOT NULL constraints b. FOREIGN KEY constraints c. PRIMARY KEY and UNIQUE constraints d. IDENTITY columns e. CHECK constraints 17) Which of the following are not date parts? a. quarter b. dayofweek c. dayofyear d. weekday 18) The IF UPDATE (column_name) parameter in a trigger definition will return TRUE in case of an INSERT statement being executed on the triggered table: a. Yes b. No c. It returns TRUE only if an UPDATE query is executed d. Both b and c 20) Which one of the following must be specified in every DELETE statement? a. Table Name b. Database name c. LIMIT clause d. WHERE clause e. Column Names 22) Which one of the following correctly selects rows from the table myTable that have null in column column1? a. SELECT * FROM myTable WHERE column1 is null b. SELECT * FROM myTable WHERE column1 = null c. SELECT * FROM myTable WHERE column1 EQUALS null d. SELECT * FROM myTable WHERE column1 NOT null e. SELECT * FROM myTable WHERE column1 CONTAINS null 28) Is this statement true or false: A cursor is a pointer that identifies a specific working row within a set a. True b. False 31) Which of the following commands is used to change the structure of table? a. CHANGE TABLE b. MODIFY TABLE c. ALTER TABLE d. UPDATE TABLE

32) Consider the following statements and pick the correct answer: 1. ceiling() - returns the smallest integer greater than or equal to the specified value 2. floor() - returns the largest integer less than or equal to the specified value a. 1 is true and 2 is false b. 1 is false and 2 is true c. Both 1 and 2 are true d. Both 1 and 2 are false 36) What is the correct SQL syntax for returning all the columns from a table named Persons sorted REVERSE alphabetically by FirstName? a. SELECT * FROM Persons WHERE FirstName ORDER BY FirstName DESC b. SELECT * FROM Persons SORT REVERSE FirstName c . SELECT * FROM Persons ORDER BY -FirstName d. SELECT * FROM Persons ORDER BY FirstName DESC SELECT * FROM Persons ORDER BY DESC FirstName 37) What is the maximum value that can be stored for a datetime field? a. Dec 31, 9999 b. Jun 6, 2079 c. Jan 1, 2753 d. Jan 1, 2100 39) Consider the following queries: 1. select * from employee where department LIKE [^F-M]%; 2. select * from employee where department = [^F-M]%; Select the correct option: a. Query 2 will return an error b. Both the queries will return the same set of records c. Query 2 is perfectly correct d. Query 2 would return one record less than Query 1 44) How can you view the structure of a table named myTable in SQL Server? a. desc myTable b. desc table myTable c. sp_columns myTable d. None of the above e. Using either option a or c 46) What does referential integrity (also called relational integrity) prevent? a. Loss of data from employee sabotage b. Loss of data from any one corrupted table c. Recursive joins yes d. One-to-many or many-to-many relationships between columns in a table e. Data redundancy 47) Which of the following is not a global variable? yes a. @@colcount b. @@error

c. @@rowcount d. @@version e. All are valid global variables 48) Consider the following two tables: 1. customers( customer_id, customer_name) 2. branch ( branch_id, branch_name ) What will be the output if the following query is executed: Select * branch_name from customers,branch a. It will return the fields customer_id, customer_name, branch_name b. It will return the fields customer_id, customer_name, branch_id, branch_name c. It will return the fields customer_id, customer_name, branch_id, branch_name, branch_name d. It will return an empty set since the two tables do not have any common field name e. It will return an error since * is used alone for one table only 49) Which of the following is not a control statement? a. ifelse b. if exists c. dowhile d. while e. beginend 50) Which of the following is not a valid Numeric datatypes in SQL Server? a. INT b. SMALLINT c. TINYINT d. BIGINT e. MONEY 51) Which of the following datatypes is not supported by SQL-Server? a. Character b. Binary c. Logical d. Date e. Numeric f. All are supported 53)What will the output be if you try to perform arithmetic on NULL values? a. 0 b. NULL c. It will generate an error message d. Cant be determined 55) Which of the following options is not correct about the DATEDIFF() function? a. It returns the difference between parts of two specified dates b. It takes three arguments c. It returns a signed integer value equal to second date part minus first date part d. It returns a signed integer value equal to first date part minus second date part 56) Sample Code

CREATE TABLE table1( column1 varchar(50), column2 varchar(50), column3 varchar(50), column4 varchar(50)); Which one of the following is the correct syntax for adding the column named column2a after column2 to the table shown above? a. ALTER TABLE table1 ADD column2a varchar(50) AFTER column2; b. MODIFY TABLE table1 ADD column2a AFTER column2; c. INSERT INTO table1 column2a AS varchar(50) AFTER column2; d. ALTER TABLE table1 INSERT column2a varchar(50) AFTER column2; e. CHANGE TABLE table1 INSERT column2a BEFORE column3; 57) State which of the following are true a. Views are a logical way of looking at the logical data located in the tables b. Views are a logical way of looking at the physical data located in the tables c. Tables are physical constructs used for storage and manipulation of data in databases d. Tables are logical constructs used for storage and manipulation of data in databases 58) Which of the following is not a valid binary datatype in SQL Server? a. BINARY b. VARBINARY c. BIT d. IMAGE e. TESTAMP 59) Which of the following is false with regards to sp_help? a. When a procedure name is passed to sp_help, it shows the parameters b. When a table name is passed to sp_help, it shows the structure of the table c. When no parameter is passed, it provides a list of all objects and user-defined datatypes in a database d. All of the above are true 60 ) Which of the following are false for batches (batch commands)? a. Statements in a batch are parsed, compiled and executed as a group b. None of the statements in the batch is executed if there are any syntax errors in the batch c. None of the statements in the batch is executed if there are any parsing errors in the batch d. None of the statements in the batch is executed if there are any fatal errors in the batch 61) Select the correct option: a. Optimistic locking is a locking scheme handled by the server, whereas pessimistic locking is handled by the application developer b. Pessimistic locking is a locking scheme handled by the server, whereas optimistic locking is handled by the application developer 8. shailesh Said: April 9th, 2006 2:58 pm Syllabus of the Visual Basic Test VB programming language

Controls, Events and Properties Forms Data Access Creating ActiveX Controls Error Handling Reports 1) You are creating a client application that calls ActiveX DLLs. Which of the following properties of the Err object provides the name of a component that sends an error back to the client application? a. Number b. Description c. CompName d. Component e. Source f. Text g. Desc h. None of the above 2) If the Cancel Error Property of the CommonDialog Box is set to true then which of the following statement is true: a. A runtime error can result if the user clicks the cancel button b. A compile time error occurs c. The program executes without any error d. You need to carry out conditional compilation e. None of the above 3) What is the extension of the Visual Basic project file that stores the design of a user control. a. .ctx b. .ctl c. .ctr d. .ocx e. .vbp f. .dll g. .ucl h. .utl 4) A __________ control defaults to displaying the files in the current directory: a. File List Box b. Dir List Box c. Drive List Box d. Combo Box e. Picture Box f. List Box g. Combo Box h. DataGrid 5) To destroy an object and free the memory space occupied by it, the keyword used is:

a. Delete b. Kill c. Nothing d. New e. Calloc f. New g. Conserve h. Free 6) Which event of a text box would you use for validating the data entered by the user? a. Validate b. Validation c. Check d. Audit e. GotFocus f. Checkdata g. ValidateDate 7) Which of the following statements forces inline error handling? a. On Error GoTo linelabel b. On Error GoTo Inline c. On Error Stop d. On Error Resume Next e. On Error GoTo 0 f. On Error Resume g. None of the above 8) The _______ method resets the contents of bound controls to their original values when the user clicks on the cancel button. a. UpdateControls b. PaintPicture c. Refresh d. Resize e. Resync f. Restore g. Cancel h. Update 9) To deactivate the Form UnLoad event, you make the following change in the function definiton: Private Sub Query_Unload(Cancel as Integer,UnloadMode as Integer) To prevent the Form from closing, you will set the: a. Cancel parameter to a non-zero value b. Cancel parameter to 0 c. UnloadMode parameter to a non-zero value d. UnloadMode parameter to a zero value e. UnloadMode parameter to 1 f. Cancel parameter to 1

10) How many root nodes can a TreeView control have? a. 1 b. 2 c. 3 d. 4 e. 5 f. 10 g. Upto 50 h. No limit 11) A project group is a Project which: a. Consists of several Programs b. Consists of several Applications c. Consists of Various Forms And Code Modules d. Consists of several Projects 12) Procedures declared in a _____ are local whereas procedures declared in a ______ are available to the whole application. a. Form window, standard or code module b. Project window, view code window c. Class module, code module 13) How can you keep the user from exiting a form by clicking the Close button? a. Place code in the Terminate event b. Place code in the Unload event c. Place code in the QueryUnload event d. This can only be done by using the Windows API e. Place code in the Load event f. Place code in the Terminate event g. Place code in the Deactivate event h. None of the above 14) In order to provide a transparent background to the Form, you must change the _________ property to _______. a. BackStyle, Opaque b. BackColor, White c. BackStyle, Transparent d. BackColor, Parent Windows Color e. ZOrder, 0 f. BackColor, Transparent 15) The _______ property enables Visual Basic to draw complete images in memory before displaying them on the Screen. a. AutoRedraw = True b. AutoRedraw = False

c. Refresh d. PaintPicture 16) You want to display the code and the description of an error. What would be the correct syntax? a. Msgbox err.no & err.text b. Msgbox err.number & err.text c. Msgbox error.number & error.text d. Msgbox error.number & error.description e. Msgbox err.number & err.description f. Msgbox err.num & err.description g. Msgbox err.num & err.text h. None of the above 17) What is the purpose of the Image List Control? a. To display images to the user b. To help in creating a ToolBar c. To allow the editing of icons d. To provide a repository for images used by other controls e. To provide images to the listbox control f. To provide images for the splash screen g. To provide icons for error messages 18) Which method would you use to get a free or unused File identifier while opening any file: a. FreeFile b. GetFileNum c. GetFile d. GetBytes e. NextFile f. File g. GetNextFile h. None of the above 19) Which property procedure is used to retrieve the value of a property? a. Retrieve b. Get c. GetProperty d. Value e. RetrieveValue 20) Which of the following can be shown to the user using the Common Dialog control in VB? a. Common messages passed to Windows b. Open dialog box c. Windows explorer d. Input box e. Message box f. Error messages

g. Help h. None of the above 21) Which event is triggered when the user moves to another open form? a. Unload b. QueryUnload c. Deactivate d. Terminate e. Load f. Initialize g. Repaint h. Resize 22) Which event of an ActiveX control data provider runs every time a bound control extracts data through the provider? a. GetDataMember b. GetDataField c. GetDataProperty d. GetDataRow e. GetData f. GetFields g. GetRows h. RetrieveData 23) Which of the following are not properties of Command Button: a. Caption b. Visible c. Multi-Line d. Font e. Name f. Bold g. Tag h. Enabled 24) You are creating an ActiveX component that raises user-defined errors. Which of the following statements correctly raises an error to the client with error number 20000? a. Err.Raise vbObjectError + 20000 b. Err.Number = 20000 c. Err.Raise 20000 d. Err.Raise vbObjectError,20000 e. Err.Number 20000 f. Error.Raise vbObjectError + 20000 g. Error.Number 20000 h. Error.Raise 20000 25) Which events enable you to determine which key was pressed by the user?

a. Click and KeyPress b. Click, KeyUp and KeyDown c. KeyUp and KeyDown d. KeyPress, KeyUp and KeyDown e. Click, KeyPress, KeyUp and KeyDown 26) In order to access a file in Non-textual format, you have to open file in: a. Ascii Format b. Binary Format c. Input Mode d. Output mode e. Append mode f. Read Mode 27) Visual Basic displays information depending upon the current value of two properties of the form, called: a. CurrentX and CurrentY b. ScaleLeft and ScaleTop c. ScaleHeight and ScaleTop d. x and y e. TopX and TopY f. LeftX and LeftY 28) Which of the following procedure types will execute when you assign a value to a property of an object? a. Property Get b. Property Assign c. Property Let d. Property Set e. Public Sub 29) In order to overlap the controls (say a command button) during design time, we use the Send To Back or Bring To Front option from the Edit menu. To change it dynamically (i.e. during program execution) we need to change: a. Background color property b. Caption property c. ZOrder property d. AutoRedraw property e. SendtoBack property f. BringtoFront property g. Hide property h. Show property 30) Name the only property supported by a collection? a. Name b. Index

c. Count d. Type e. Value f. Add g. Remove h. None of the above 31) Which of the following situations would not cause the Initialize event of an ActiveX control to occur? a. When a control is placed on a form at design time b. When a form designer containing a control is closed c. When a form is run d. When a compiled application containing a control executes e. When an application terminates and re-enters design-time for the host application 32) Which event occurs only once in the entire life cycle of an ActiveX control? a. Initialize b. Resize c. Terminate d. WriteProperties e. InitProperties f. Activate g. None of the above 34) You are creating an ActiveX component that raises user-defined errors. What is the valid range of error numbers that you can use for user-defined errors? a. 1-1000 b. 0-255 c. 1-65535 d. 0-1000 e. 513-65535 f. 1000-2000 g. 10000-20000 h. None of the above 35) Which property of the ProgressBar determines how much of the bar is filled? a. Min b. Max c. Value d. CurrentVal e. FillValue f. Fill g. BarComplete 36) The ______ function can be used to run any .com, .exe, .bat or .pif file from a Visual Basic program.

a. Shell b. Substr c. SetAttr d. CStr e. Exec f. Perform g. Do h. None of the above 37) One can convert a Visual Basic Application into ActiveX Document using: a. Visual Database Manager b. Application Wizard c. ActiveX Document Migration Wizard d. Package and Deployment Wizard 38) The caption and the name properties of the command button: a. Are one and the same b. Can be different at times c. Are actually not properties 39) You try to initialize a new Object variable with the following line but receive an error. What could be the possible cause? Set MyVar = New Classname a. You do not need to use the Set command here b. You do not have the permission to access the class c. MyVar has not been declared d. You do not need to use the New keyword here e. None of the above 40) Which of the following will perform a direct execution of a Command object? a. The Execute method b. The Prepare method c. The ExecDirect method d. The Open method e. The Exec method f. The ExecProcedure method g. None of the above 41) The vbCritical symbol displays: a. A warning query icon b. A critical message icon c. A warning message icon d. An exclamation icon e. None of the above 42) What does the forms collection contain? a. A list of all forms in a project b. A list of all hidden forms

c. A list of all currently loaded forms d. A list of all visible forms e. All the child forms of an MDI application 43) Which method of the Recordset object should you use to navigate multiple recordsets returned by a stored procedure? a. NewRecordset b. NavigateRecordset c. OpenNextRecordset d. NextRecordset e. SkipRecordset f. PreviousRecordset g. JumpRecordset h. GoTORecordset 44) Which of the following cannot be included in the Open method of the recordset? a. Cursor Type b. User Name c. Active Connection d. CursorLocation e. LockType f. Source 45) The settings for the Color properties in Visual Basic are indicated by: a. Decimal Coding b. Octal Coding c. Hexadecimal Coding d. Binary Coding 46) What you must do before you make calls to an ActiveX DLL project in the same Project Group? a. Compile the DLL b. Check the DLL off in your projects Reference List c. Make sure the DLL is the Startup Project d. Ensure that a Standard Exe form is included and is made the Startup Form. 47) The _______ property changes the tab order at runtime: a. Tab stop b. Tab key c. Tab order d. Tab index 48) What do CurrentX and CurrentY return? a. Current X and Y co-ordinates of mousepointer b. Current X and Y co-ordinates of cursor c. A String of X & Y d. Current x and y co-ordinates of the control 49) The Kill command in Visual Basic is used for: a. Stopping the current process b. Deleting files

c. Terminating the application d. Stopping the current thread e. Debugging the application f. Error handling g. None of the above 50) If one needs to use an ampersand(&) in a Label but does not want it to be an Access Key, the _______ property of the label must be set to False. a. Caption b. ClipControls c. UseMnemonic d. LinkMode e. Locked f. Label g. ZOrder h. Visible 51) Which of the following is the only drag related event? a. DragEnter b. DragLeave c. DragStart d. DragStop e. DragDrop f. BeginDrag g. EndDrag 52) Which property of the form changes the forms title? a. Name b. Heading c. Title d. Caption e. Logo 53) Labels do not respond to _____ and ______ events. a. Got_Focus , Lost_Focus b. Click , DblClick c. Dragdrop , OLECompleteDrag d. Change, Link Error 54) Which of the following statements is capable of abandoning a series of modifications made to a recordset locked with a BatchOptimistic lock? a. CancelUpdate b. CancelBatch c. CancelBatchUpdate d. AbandonBatch e. AbandonBatchUpdate f. Rollbackupdate

g. Rollbackbatch h. None of the above 55) Which three methods does the collection object support? a. Let, Get, Set b. Load, Unload, Count c. Add, Remove, Item d. Add, Delete, Index e. Add, Remove, Sort f. Add, Remove, Count g. Add, Delete, Count h. Add, Set, Count 56) Which line of code listed here can be used to create a string of fixed length: a. Dim strFirstName as String b. strFirstName * 255 c. strFirstName = 255 d. Dim strFirstName as String(255) e. None of the above 57) Consider the following program code: (i) Dim FileName as String Open FileName For Input As #FreeFile (ii) Dim FileName as String FileNum = FreeFile Open FileName For Input As #FileNum a. Both (i) and (ii) are correct b. Only (i) is correct c. Only (ii) is correct d. (i) contains a logical error e. (ii) contains an error f. Both (i) and (ii) contain errors 58) Which property of the Err object returns the numeric value associated with the most recent runtime error? a. Description b. No c. Number d. Source e. Errorcode f. Num g. Code 59 ) In Visual Basic, which method can you use to send key strokes to other Window applications? a. AppActivate b. SendKeys

c. Copying the contents from the ClipBoard & pasting d. Manually typing in the other applications Window 60) The ______ property is used to show Tool Tips or Help Balloons when the mouse rests on the object: a. ToolTipText b. Tag c. Dragmode d. ShowTips e. Help f. Tip g. ShowHelp h. Tab 61) What is the sequence in which the following events are triggered when a form is loaded? a. Initialize, Load, Resize and Paint b. Initialize, Load, Paint and Resize c. Load, Initialize, Resize and Paint d. Load, Initialize, Paint and Resize e. Initialize, Resize, Paint and Load f. Load, Paint,Initialize and Resize g. Initialize, Paint, Load and Resize h. Paint, Resize, Initialize and Load 62) Which parameter of the WriteProperty method can be omitted but should be included to increase the efficiency of the control? a. Name b. Value c. Caption d. PropBag e. DefaultValue f. Title g. Tag h. None of the above 63) Message Boxes can hold a maximum of _______ characters. a. 256 b. 512 c. 1024 d. 2046 e. 4092 f. 5000 g. 10000 h. No limit 64) Which parameter of the Execute method of the Connection object returns the number of records that the operation affected?

a. RecordsAffected b. RowsAffected c. RecordsUpdated d. RowsOperated e. RecordsOperated 65) Which of the following is not an element of the ADO model? a. Database b. Error c. Connection d. Parameter e. Recordset f. Field g. Driver 66) What data type is the HelpContextID? a. String b. Integer c. Single d. Double e. Long f. Char g. Float 67) Variables that allow sharing of values across event procedures are called: a. Form level variable b. Object variable c. Module level variable 68) Which property of the ListView control determines which field a sort is based on? a. Sorted b. SortKey c. SortOrder d. SortField e. Sort f. Key g. ListKey h. None of the above 69) Consider the following subprogram: Sub ChangeText(ByVal X as String,Y as String) Y=X End Sub If you are calling it using the following code: Call ChangeText(Form1.Caption,Y$)

a. The Caption of Form1 will change to the value contained in Y$ b. The Caption of Form1 will not change c. The Caption changes at random intervals after the function call d. The code is incorrect 70) Visual Basic fires the _______ event everytime a part of the form is newly exposed. a. Load b. Activate c. Paint d. Show e. Initialize 71) Which of the following ADO recordset types provides the greatest degree of concurrency? a. Static b. Forward-only c. Dynamic d. Keyset e. Read only f. Keyset and Dynamic 72) Which of the following is the only valid Resume statement in an error handler? a. Resume prior b. Resume previous c. Resume later d. Resume next e. Resume before f. Resume to g. Resume statement h. Resume application 9. Monika Said: June 6th, 2006 2:29 am Hi I want to automate the Vb exe which takes some input parameters. What are the various options to do this? Thanks Monika Sharma 10. samanta Said: June 16th, 2006 5:19 am Hi, I was wondering if you could help me. I am developing a form in vb which has a MS Access db running behind it. On the from, I have a data grid which retrieves the information of customers (name, payment ..)

From that db and outputs it to the screen. My problem is that I need to create a button on which I click And should give me the sum of payments (on a label) of all customers and another button for the sum of payments for each customer (on a label). I am sure that I have to use SQL but how to do it please. By the way I did the DB Access connection not in code , I did it manually in the properties of the adodc. Thank you very much. 11. Deepak Said: July 31st, 2006 12:02 am I have created VB application using Crystal report and MS acess as backend.I have made package of that application using Package & deployment wizard. But porblem aries when i run setu on another machine reqiures reboot due to out of Date system files,but it will not reboot automatic so manually reboot but setup still require reboot again and again. please help me,Thanks 12. Jitendra Thakur Said: August 3rd, 2006 3:07 am Can any one help me 1- What is the MTS 2-why we using the MTS in vb Project . some advantage and disadvatage. Thanking you . JItendra Thakur 13. sai Said: September 22nd, 2006 10:06 am iam doing a small project in vb 6.0 . iwant to know that how validations are given to forms,textboxes and also error traping procedures. thank you sai 14. Durga Devi Said: November 3rd, 2006 5:52 am hi I want to ask 4 Questions What is the difference between an ARRAY and a LIST? What is faster : access the element in an ARRAY or in a LIST? What is Byval and ByRef in VB? And how does it work? 15. abhi Said: December 26th, 2006 7:00 am

what is the Differnce between P-code and Native Code ? what is the Differnce between ByVal and ByRef ? 16. Abhishek Said: December 29th, 2006 4:40 am Some questions in mind are: 1. Explain the ADOs object hierarchy. 2. Explain cursor location. 3. Explian cursor type. 4. Explain lock type. 5. Explain Disconnected recordsets. 17. Jegath Said: January 19th, 2007 12:00 pm How to find count a days in two different dates? for eg: 15/2/2007 and 19/3/2007 18. shobhit Said: February 2nd, 2007 11:00 pm What is the difference between an ARRAY and a LIST? 19. shobhit Said: February 2nd, 2007 11:11 pm 1.3 main differences between flexgrid control and 2.dbgrid control 3. ActiveX and Types of ActiveX Components in VB 4. Advantage of ActiveX Dll over Active Exe 5. Advantages of disconnected recordsets 6.Benefit of wrapping database calls into MTS transactions 7. Benefits of using MTS 20. Saem Said: March 3rd, 2007 4:06 pm I am a computer studies student I wanted to ask what is the output using 1,3,2,2,4,5,6,2,0? of the algorithm used below, and that what is the purpose of this algorithm. Thanks value=0 new value=0 input value input next_value WHILE new_value is not equal to zero DO IF new_value is greater than value THEN value is equal to new_value ENDIF input next_value

ENDWHILE output value 21. brocklings Said: September 27th, 2007 9:26 am Samanta this is ur asnwer rs.open (select sum(payments) from ,connectionstring,keytype,locktype label1.caption= rs(0) 22. brocklings Said: September 27th, 2007 9:32 am Durga Devi here answer for ur question array: array is used to store same datatype at coding time. list: list is the control in vb6.0 where we can store any value in list at designtime

Visual Basic interview questions


1. 2. 3. 4. 5. 6. 7. How do you center a form? Can I send keystrokes to a DOS application? Convert an RGB value to a long, or a long to RGB. Implement smooth scrolling for either text, graphics or controls across a form. Implement some quick and easy encryption (can be something primitive). 4 different types of sorts: advantages and disadvantages. 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 its 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?

64 Responses to Visual Basic interview questions


1. SSRST Said: May 20th, 2005 3:30 am for Quest: 1 In the form properties, the startup position property is having two option regarding Center the form. 1. 1-Center Owner :- The form will be made centered based on the current form that calls the form. i.e., if already one form is opened then the next form will be the center to that form which will be called. 2. 2-Center Screen :- I hope no need of any explanation for this. 2. SSRST Said: May 20th, 2005 3:39 am for Quest 3 : Converting an RGB Value to Long LongVar = BlueValue * 65536 + GreenValue * 256 + redValue Converting a Long to RGB RedValue = LongValue Mod 256 GreenValue = ((LongValue And &HFF00) / 256&) Mod 256& BlueValue = (LongValue And &HFF0000) / 65536 Source - from google. 3. Rajat Kapoor Said: May 28th, 2005 4:39 am For Question No.11 To put an asterik mark for entered password characters in a textbox,there is a textbox property namely Password Char.Put * there to get asterik sign for each entered password character. 4. Ranjit Kishor Verma (PRITHS) Said: June 5th, 2005 8:00 am Ans of Q.01 :- set StartupPosition=Center Screen of the form.

5. Ranjit Kishor Verma (PRITHS) Said: June 5th, 2005 8:03 am Ans of Q.12 : - VB doesnt have multicolums prperty for a combobox, but we can create a custome control using(textbox, command button and any grid). 6. Ranjit Kishor Verma (PRITHS) Said: June 5th, 2005 8:05 am Ans of Q.17 :- Just call the CommandButton1_Click event from anywhere. 7. Ranjit Kishor Verma (PRITHS) Said: June 5th, 2005 8:07 am Ans of Q. 20 :Types of ActiveX Components:- ActiveX Dll, ActiveX Exe, ActiveX Controls, ActiveX Document Dll, ActiveX Document Exe 8. Ranjit Kishor Verma (PRITHS) Said: June 5th, 2005 8:11 am Ans of Q.21 :Advantages of Dll over Exe:Dll is faster WRT exe, because dll runs within the same process space of its client where as exe runs on its own process space. Difference :1. Dll is faster than exe 2. dll is in-process whereas exe is out-process 9. Ranjit Kishor Verma (PRITHS) Said: June 5th, 2005 8:13 am Ans of Q.26 :Line, Shape, Label 10. Ranjit Kishor Verma (PRITHS) Said: June 5th, 2005 8:14 am Ans of Q.27 :Name is the default property. 11. Ranjit Kishor Verma (PRITHS) Said: June 5th, 2005 8:16 am Ans of Q.36 :-

run this command regsvr32 c:\\MyDll.dll to register run this command regsvr32 \u c:\\MyDll.dll to un-register 12. Sanjay Kumar Said: June 10th, 2005 12:25 pm Ans of Q51 Option Explicit is used to ensure that all variables that are being used in the code are declared.. 13. Anjan Said: June 21st, 2005 3:49 am I disagree the answer of the Q.26 given by Mr.Ranjit Kishor Verma (PRITHS) that Label has no events. Lable has so many events like CLICK,DBLCLICK,MOUSEMOVE and amny more. Only LINE and SHAPE control has No events. 14. Anjan Said: June 21st, 2005 4:24 am Ans of 60. Use the Stretch property to determine whether the graphic is scaled to fit the control or vice versa. 15. vivek s Said: June 26th, 2005 10:01 am To set the command button for ESC, Which property needs to be changed? cancel property needs to be set to true 16. meenakshi Said: June 28th, 2005 12:11 am answer to Q.9 : Option Explicit Private Declare Function WinHelp Lib user32 Alias WinHelpA _ (ByVal hwnd As Long, ByVal lpHelpFile As String, _ ByVal wCommand As Long, ByVal dwData As Long) As Long Private Const HELP_CONTENTS = 3 Private Const HELP_FINDER = 11 Private Sub Command1_Click() Dim lResult As Long Dim sHelpFile As String Dim lCommand as Long, lOption as Long sHelpFile = winfile.hlp lCommand = HELP_CONTENTS lOption = 0

lResult = WinHelp(Me.hwnd, sHelpFile, lCommand, lOption) End Sub source google 17. abhinay ramadugu Said: July 1st, 2005 12:40 am hello nice to see the questions u people posed and feeling some what happy in answering them please give us some more faqs based on sql server 2000 and vb.net very much interested in asp.net also so i need some important and useful questions on asp.net also thank you with regards abhinay 18. Dharmendra Joshi Said: July 4th, 2005 1:55 am Ans to Q14Menus at runtime in vb can be created using Windows API. 19. Subbu Said: July 6th, 2005 4:53 pm Answer for question 1 Private Sub Form_Load() Form1.Top = (Screen.Height - Form1.Height) / 2 Form1.Left = (Screen.Width - Form1.Width) / 2 End Sub 20. Prashant Gadekar Said: July 9th, 2005 4:44 am For Question 58. Controls without align property can not be placed directly on MDI form 21. Vishwanath Said: July 13th, 2005 4:09 am How to call stored procedure from vb with code example. 22. Ernz Said: August 7th, 2005 3:38 pm SSRST - YOU BEAUTY!!!! I have been looking for Long to RGB conversion for hours now! Big Thanks! It is for a colour picker tool I am putting together in my spare time. Excellent! You can check it out on my website( when I finish developing it). http://www.Ernz.co.uk

23. keeda Said: August 9th, 2005 8:49 am 4 different types of sorts: advantages and disadvantages -quick sort -bubble sort -heap sort -insertion sort Quick sort is faster. for further info: http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/sorting.html 24. keeda Said: August 9th, 2005 8:54 am Compute CRC32 checksum, write a quick piece of code that accepts the packet of data and returns the CRC. http://www.vbaccelerator.com/home/VB/Code/Libraries/CRC32/article.asp 25. keeda Said: August 9th, 2005 9:16 am How do you use the Mouse OFF event? Call Win32 API CCTrackMouseEvent of Lib COMCTL32.DLL http://www.vbaccelerator.com/home/VB/Code/Libraries/Subclassing/Generating_MouseLeave_Events _for_a_Window/article.asp 26. keeda Said: August 9th, 2005 10:33 am How do I call Windows Help files from a VB program? http://smountain.com/resource/VBWinHelp.pdf 27. SSRST Said: August 17th, 2005 5:15 am Quest No: 63 The Maximum length of the TextBox : 32,000 characters. Please correct if wrong. 28. SSRST Said: August 17th, 2005 5:33 am

Quest No: 62 Any of the designtime properties cannot be set at Runtime : Ex :- MultiLine Property. 29. SSRST Said: August 17th, 2005 5:59 am Quest No :- 58 The control without align property cannot be placed in an MDI Form. Eg:- TextBox. If we want to place even those control in MDI Form, then place a picture box in the MDI and form and place the controls in that. 30. B.Bhaskar Rao Said: August 21st, 2005 7:31 am how can I send keystrokes to a dos application? 31. Larry Serflaten Said: September 5th, 2005 11:54 am I am thinking the answers should look more like these first 20 answers: 1. Center a form: Private Sub Form_Load() Me.Move (Screen.Width - Me.Width) \ 2, _ (Screen.Height - Me.Height) \ 2 End Sub 2. Keystrokes to DOS? Yes, SendKeys sends keystrokes to the currently active window. 3. RGB to Long? Long to RGB? Value = RGB(Red, Green, Blue) Red = Value And &HFF Green = (Value And &HFF00&) \ &H100& Blue = (Value And &HFF0000) \ &H10000 4. Implement smooth scrolling? Scrolling is simply movement in very small increments applied fairly rapidly. The smallest noticeable increment value is movement by one pixel. Text, graphics, or controls rapidly and repeatedly moved in a single direction by one pixel each move will appear to be moving smoothly.

5. Encrypt text. Function Encrypt(Text As String, Password As String) Dim idx As Long, key As Long key = (Int(Sqr(Len(Password) * 95)) + 21) Encrypt = Space$(Len(Text)) For idx = 1 To Len(Text) Mid(Encrypt, idx, 1) = Chr$(Asc(Mid(Text, idx, 1)) Xor key) Next End Function 6. Sort comparisons NAME: Advantage (Disadvantage) - SL = Small Lists, LL = Large Lists INSERTION: Simple, fast for SL (Slow for LL) BUBBLE: Fast for lists almost sorted (Slow for all other lists) QUICK: Fast for LL (Trouble with duplicates) MERGE: Fast for LL, paging friendly (Requires scratch memory) 7. CRC32 See: http://www.freevbcode.com/ShowCode.Asp?ID=655 8. Mouse OFF? There is no MouseOff event. 9. Call Help? The Common Dialog controls ShowHelp method is the Microsoft recommended way of calling Help topics. 10. Allow tabs? Set the textboxs MultiLine property to True. 11. Display * ? Set the textboxs PasswardChar property to *. 12. Multi-column Combobox? Creating your own control allows for many properties and methods not found on the standard VB controls. One method might include using the ListView as the drop down list of a custom combobox. 13. Popup Menu?

Use the PopupMenu statement from the command buttons MouseDown event. 14. Create runtime menus? Design your menus as control arrays and use the Load statement to add more menus. 15. Generic error handler? Public Sub SomeRoutine() On Error GoTo Handler trapped code added here SubExit: Exit Sub Handler: MsgBox Err.Description, , Error in processing Resume SubExit End Sub 16. Clipboard text? To Clipboard.SetText Text, vbCFText From If Clipboard.GetFormat(vbCFText) Then Text = Clipboard.GetText End If 17. Call a command button click event? Command1.Value = True 18. Write an app to Encrypt & Decrypt One such application would be to include asyncronous encryption which provides one routine for both encryption and decryption. An example of asyncronous encryption follows: Public Function Crypt(Text As String) As String Dim idx As Long, vlu As Long Crypt = Text For idx = 1 To Len(Text) vlu = Asc(Mid$(Text, idx, 1)) Select Case vlu Case 32 To 127 Mid(Crypt, idx, 1) = Chr$(128 - vlu) Case Else

End Select Next End Function 19. Flexgrid vs DBGrid? 1. User interface 2. Data source 3. Formatting methods 20. ActiveX ? ActiveX is the technology used by Microsoft to identify programmable components of an application. The three main types of ActiveX components include ActiveX EXE (Stand-alone, out-of-process), ActiveX DLL (in-process), and the ActiveX Control (.ocx). 32. Uday Pharate Said: October 29th, 2005 11:47 pm The answer given for question no. Q.26 was revised to exclude Label from the list but further going, there is one more control which is being missed out which doesnt hold any events, its the common dialog control. 33. Taruna Said: December 15th, 2005 3:36 am I believe 65500 words is the maximum length of text box 34. Saurabh Jain Said: March 10th, 2006 4:23 am The maximum length of text box is 65535. This is abosultly correct. 35. aravind Said: April 14th, 2006 6:28 am Ans of Q.17 :- write code CommandButton1.value=true 36. Diwakar Said: April 17th, 2006 5:10 am The maximum length of a textbox is dynamic, if your operating system creates virtual memory. 37. jayraj todkar Said: May 3rd, 2006 12:43 am 1> How to create runtime object of textbox, command button? and how to place textbox on the form runtime?

38. ac Said: June 13th, 2006 5:43 pm 56. listbox control 39. saji Said: July 19th, 2006 5:53 am Q. How to call stored procedure from vb with code example.? ans: option explicit dim con as new adodc.connection dim strsql as string strsql=exec procedurename con.execute strsql 40. Joe Gakenheimer Said: August 1st, 2006 2:16 pm Question 50: What do ByVal and ByRef mean and which is the default? In VB, by default all arguments are passed in by value. A copy is sent to the subprocedure or function rather than a pointer to the original memory location. Any changes made to the arguments inside of the sub will NOT affect the variables passed to the sub. When you choose to pass by reference, you are passing in the original memory location. Any changes made to the arguments inside of the sub will affect the variables passed to the sub. ByVal and ByRef example 41. mukund Said: August 16th, 2006 2:31 am >What is the difference between Msgbox Statement and MsgboxQ function? ans : Msgbox is the inbuild function in vb and MsgboxQ is the function developed by the programmer to complete his task. >Which controls have refresh method, clear method ? ans: list box, combo box >Which property of menu cannot be set at run time? ans : name > Which property of textbox cannot be changed at runtime? ans : name > difference in query unload and unload in form ans : in query unload event we can find how the user is closing the form eg via cross(x)button in right top corner or thr control menu etc which is the one step before unload of form 42. polaswamy kranthi kumar Said: August 28th, 2006 1:38 am How a run time text box can be created?Is it possible?

43. lalita.p Said: September 19th, 2006 2:03 am Answer for Q48. ADO Objects Mian Three Objects are 1)Connection Object:Resposible for establishing the connection with database. 2)Command Object:Responsible for executing the quries against the database. 3)Recordset Object :Used to store the result which we get from executing the quries. 44. lalita.p Said: September 19th, 2006 2:09 am what is difference bet DLL and EXE. DLL implements as an inprocess component.They run on the same space as that of the client due to which they are fast. EXE implemented as an out of process component.there is not direct communication bet client and server. it happens thr mashalling.They do not run on same space as that of the clent. due to which they are comparitivly slow. 45. lalita.p Said: September 19th, 2006 2:12 am what is Activex? Activex component are the component when drag and drop on the canvas of the form with the help of toolbox.besides this,Activex component help the user to create her/his own component which are use in the developement environment. 46. Dhandapani.S Said: October 13th, 2006 7:39 am Ans 36. To register a ActiveX dll : run the command in dos window or RUN window regsvr Ans 44. To set ESC button for a command button, just set the value TRUE to its CANCEL property. 47. Dhandapani.S Said: October 13th, 2006 7:46 am Ans 36. To register a ActiveX dll : run the command in dos window or RUN window regsvr [pathname\dllName.dll] to unregister regsvr/u [pathname\dllName.dll]

48. Shukla Dhruti Said: November 2nd, 2006 11:36 pm 16. How to copy text to the Windows clipboard and from it. Do bellow code in code window. Private sub copy_click() clipboard.clear clipboard.settext screen.activecontrol.seltext End sub 49. Sujoy Mukherjee Said: November 15th, 2006 8:27 am Ans 21 : ActiveX dll is a in process component and ActiveX exe is a out process components, thats why activeX dll is more faster than the ActiveX exe. Actually Marshaling detoriates the efficiency. 50. M.Jaikumar Said: November 30th, 2006 5:24 am 63.What is the maximum size of a textbox? Ans : 65535. 51. Siva Said: January 19th, 2007 4:50 am 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. 52. Rajiv Jain Said: February 27th, 2007 1:53 am For Quest 63: The maximum length of a text box is 65535.. 53. G.Shankar Said: March 3rd, 2007 12:44 am

51. Option Explicit enforces the user to declare all the variables explicitly 54. G.Shankar Said: March 3rd, 2007 12:48 am 13. command1_click Popupmenu menuname endsub 55. shameera sherule Said: March 9th, 2007 2:20 am 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. 56. Pradip Said: July 6th, 2007 7:04 am Create Text Box on runtime? Set myTextBox = form1.Controls.AddVB.textBox, Text1, Form1) myTextBox.Visible = True myTextBox.ZOrder 0 57. Pradip Said: July 6th, 2007 7:36 am 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 58. sneha Said: August 6th, 2007 4:11 am 51 Ans SetComplete SetAbort

59. sneha Said: August 6th, 2007 4:13 am 55. Ans. Successful ObjectContext.SetComplete UnSuccessful ObjectContext.SetAbort 60. Namadev Said: August 7th, 2007 4:00 am 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. 61. Namadev Said: August 7th, 2007 4:03 am 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. 62. Sankar Roy Said: September 1st, 2007 4:05 am 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) 63. Joe Gakenheimer Said: November 2nd, 2007 2:24 pm ByRef is the default in VB6 and below. ByValue is default in VB.Net. http://www.dotnet247.com/247reference/msgs/40/202030.aspx 64. swati Said: November 6th, 2007 6:54 am 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

Вам также может понравиться