Visual Basic 6.0
Terms
undefined, object
copy deck
- Where does does a active x dll execute?
-
Within the main programs address space.
- What is a disadvantage of early binding?
- More restrictions on DLL compatibility. If you add a new public method to a class the main program will not know about that method.
- What does publicNotCreateable mean in relation to activeX objects?
- The main program can use this type of class but cannot create new instances using the New keyword or with CreateObject.
- The six objects and methods of EOM are what?
-
1)Core objects
2)Form manipulation
3)Event Response
3)Add-In Management
4)Project and componet manipulation
5)Code manipulation - When working with a Active X object the main program can work only with what?
- Members declared as public
- When using a interface how would I declare a class named clsData the implements IData?
- Dim clsData as IData
- What is faster a ActiveX DLL or a ActiveX EXE?
- ActiveX DLL
- What is a OCA file?
- A binary file that functions as both and extended type libary file and a cache for the custom control.
- Why are ActiveX EXE's sometimes useful.
- They can run on a different computer then the main program.
- When you try instance a class that in no longer compatible what error message will you get?
- Class does not support Automation or does not support expected interface.
- Between a ActiveX DLL or a ActiveX EXE what is ussually prefered?
- A dll
- For every custom control file (OCX) there is and accompanying what?
- .OCA file of the same filename
- Where is and ActiveX EXE run?
-
It runs in a seperate process.
- What is polymorphism?
- The idea that many classes can provide the same property or method, without having to worry what type of class it is.
- What does the function Trim do?
- Removes leading and trailing spaces from string
- How would you acomplish early binding in a application.
- Go to projects and then select references. Find the object you want to bind to.
- With the Winsock control after you set what port we want to tell Winsock to do what?
- Make it so Winsock waits for a connection. The syntax is WindSock.listen
- What are the advantages of early binding?
-
1) You can use intellisense
2)It is faster - With a VB message box what icon constants can you use?
-
vbQuestion
vbInformation
vbExclamation
vbCritical - When you use late bound objects you declare them how?
- As object
- What happens when you pass ByVal?
- Visual Basic passes a copy of the variable to the procedure. The procedure gets the value but any changes it makes will not affect the original variable.
- What do interfaces provide?
- The provide a template for classes, which forces any classes that use the Interface to have the same properties and methods as the interface.
- What is the function STR used for?
- Returns a number converted to a string.
- When you bind your Active X DLL or Active X EXE at runtime it is know as what?
- Late binding
- What is the Instr function used for?
- Locates a substring in another string.
- In a class the implements a interface all procedures and properties are declared as what?
- private
- In the string ABABABAB if you wanted to remove all the a's and print it to the debug window what would you do?
-
debug.print _
Replace ("ABABABAB"), "A", "") - Any class that uses an Interface must provide what?
- They must provide the methods and properties the interface has.
- What does the Extensibility Object Model (EOM) consist of?
- It consists of six loosly coupled packages of objects with methods that implement key services of the VB object model.
- How does Visual Basic and COM provide polymorphism?
- by using interfaces, which are basically templates.
- What is the function Asc used for?
- Returns ASCII or ANSI code of a character.
- How do you create a interface in Visual Basic?
-
You simply create a new class with all the properties and methods you want, leaving the actual procedures blank.
- When using the Winsock control the first thing we must do after adding it to the form is what?
- Set the port. ex WinSock.localport = 3343
- What is the function Chr used for?
- Character corresponding to a given ASCII or ANSI code.
- What control can you use with Visual Basic to allow you to communicate across the internet or network.
- Winsock Control
- What is the RND function used for?
- Returns a random number.
- The Winsock control can be run under two modes what are they?
-
1) TCP
2) UDP - How do you accept a connection request to the winsock control?
-
In the Winsocket_ConnectionRequest event you must
1) Winsock.close
2) Winsock.Accept requestid (value passed in) - What kind of constant can't you have in a class module?
- A public constant
- When getting the value from a procedure or function parameter you can do it more then one way. What are they?
-
ByRef
ByVal - What is the Multiuse of the instancing property of a DLL used for?
- Can be created as a new object in another project. Class is loaded when first used.
- What is the Now function used for?
- Current time and date.
- What does the Abs function do?
- Returns the absolute value of a number.
- What keyword do you add to save a value to the registry?
- SaveSetting
- How would you remove a reference to a object name objForm in your code?
- set objForm = nothing
- Where does the bulk of the API functions reside?
-
1)kernel32.dll
2)user32.dll
3)gdi32.dll
4)shell32.dll - In the days of windows 3.x if you wanted to save any application setting it would have to be done how?
- In a INI file.
- What section of the registry are VB created preferences saved to?
- HKEY_USERSCurrentUsersSoftwareVB
- When you pass ByRef what happens?
- VB passes a pointer to the procedure. This is a reference so that the procedure knows how to find the value in memory.
- What is a type library?
- Is a file or component within another file that contains OLE automation standard descriptions of exposed objects, properties, and methods.
- What do we use to tell VB that we intend to put all the properties and methods necessary to expose a predefined interface?
-
Implements
- What is the default way to get a value from a procedure or function?
- ByRef
- What is a .frx file?
- A binary file used to expose binary information for a form.
- What is the Format Function used for?
- Returns date or number converted to a text string.
- If you declare a UDT in a form in must be declared as what?
- Private
- What does the VAL function do?
- Returns a numeric value of a given text string.
- When creating a DLL what are the different values you can set the Instancing property to?
-
1) Private
2) Multiuse
3) GlobalMultiuse - What does EOM stand for?
- Extensibility Object Model
- What is new with API's in VB.NET.
- They have been phased out
- How would I make a constant value 3 = vbThree ?
-
Const vbThree = 3 in the general declarations section.
- What is the GlobalMultiuse of the instancing property of a DLL used for?
- Methods and properties can be accessed from other projects like any other VB function. Class is loaded when the project that uses it is started.
- When using VB message boxes what are the button constants you can use?
-
vbOKOnly
vbOKCancel
vbYesNo
vbYesNoCancel
vbAbortRetryIgnore
vbRetryCancel
- What is the Extensibility Object Model (EOM) used for?
- It is the ability to entend, stretch, the functionality of different development tools.
- What is key in a registry?
- It is the item your value is stored in.
- What does the function Timer return?
- Number of seconds elapsed since midnight
- To get a setting already saved in the registry using VB you would use what?
- GetSettings