Braindump – Version II
Here are some more questions taken from the second exam I took.
1. One question about how to hide a form. THERE IS NO method called Application.HideForm.
Form1.Hide
à right
Form1.Visible := False à right
Form1.Active := False
Application.HideForm( Form1 )
Application.Hide
2. One question asked where OLE server derives from. The options:
TOLEAuto
TOLEServer
TCOMObject à wrong (I checked this
one)
TAutoObject à right
2b. Again, a little question asking how to invoke the object inspector
(F11). This was the only question I saw in the previous exam. This kind
of question exists to keep one from getting a very rounded zero on the test.
3. One question asked about how to debug a DLL. The options were:
- Use Turbo Debugger
- Define a parameter ‘Application Host’ in
Project Options à The wise choice in D3
- Create your program as EXE and later, check Compile as DLL à
I checked this one. Wrong! D2, not D3.
- Use the directive {$DLL}
4. One question asked what options were available when creating packages
- Uses
- Interface
- Implementation
- Contains à right
- Requires à right
Just Contains and Requires were valid. I checked all, except uses. I
missed this one.
5. One question asked about how to get the available printers using TPrinter.
The options
- EnumPrinters à I checked this
one. WRONG! I was thinking about API
- Printers property à the right
one in Delphi
- …
- …
6. Another question asked what a TFindDialog can do.
- Search files on disk à I checked
this one. WRONG!
- Search text strings on a file à
the right one
- Search a computer on network
- …
7. One question asked SQL Monitor functions. The options:
- …
- Show timestamps on queries executed against the server (YES)
- Store queries and reuse them (NO)
- …
8. I found the most stupid question I ever saw
in my life: what’s the result of that expression: 2*5/2-1? You must give
computing up if you don’t know how to answer a such question.
9. How many DataSources you can attach to a TDBCtrlGrid?
1 à This one, of course
2
Depends on how many tables are connected
…
10. You want to create a controls that display date and time as text
in a read-only fashion. Which class you must use to derive from with a minimun
unnecessary overhead?
- TWinControl
- TCustomEdit à I chose this one
- TGraphicControl
- TComponent
11. Where are Windows cursors stored?
- *.BMP
- *.RES
- *.DCR (I checked this one)
- ...
12. What you must do before using a DataModule
- The DataModule must be saved à
I checked this one because this is what I always do
- ...
- ...
- The DataModule must be included in Uses of all forms that will use
it à Maybe this is more right
13. See the code:
Sender as TButton
TButtom(Sender)
There is no difference
The first one raises an exception if invalid à
The wise choice I didn’t make L
...
The second choice uses Runtime type information to run
14. .PAS is an extension of what kind of file?
Unit à this one, of course
Form
Project
...
15. What must you use in order to move controls
on a form with the keyboard? (You never used Delphi seriously if you don’t know
this answer).
- Ctrl+Arrow
- Arrow
- Shift+Arrow
- Alt+Arrow
16. What constant you must use in order to create your own error codes?
- WM_User à right
- CM_User
- ...
- ...
17. Mark the valid user defined exception examples:
- MyException := ...
- MyException = class(EAbort) à
right
- MyException := Exception.Create( ‘Your own
exception’ ) à right
- ...
|