📄 apa.htm
字号:
<DT></DT> <DD><B>10. </B>What does the Integrated debugging option on the Debugger Options dialog box do? <P> <DT></DT> <DD>When this option is on and the program is run from the IDE, the program runs under control of the debugger. When this option is off, the program runs without using the debugger. <P></DL><H2><A NAME="Heading10"></A>Day 11</H2><DL> <DT></DT> <DD><B>1. </B>How is the transparent color used for icons and cursors? <P> <DT></DT> <DD>The background shows through wherever the transparent color is used on the icon or cursor. <P> <DT></DT> <DD><B>2. </B>How do you choose a color in the Image Editor? <P> <DT></DT> <DD>Click a color in the color palette. <P> <DT></DT> <DD><B>3. </B>How do you select an area on a bitmap to cut or copy? <P> <DT></DT> <DD>Choose the Marquee tool and then drag a rectangle with the mouse. You could also use Edit|Select All to select the entire image or the Lasso tool. <P> <DT></DT> <DD><B>4. </B>What is the maximum number of colors allowed in an Image Editor bitmap? <P> <DT></DT> <DD>256. <P> <DT></DT> <DD><B>5. </B>What is a cursor's hot spot? <P> <DT></DT> <DD>The exact pixel in the cursor that is used to report the screen coordinates to Windows when the mouse is clicked. <P> <DT></DT> <DD><B>6. </B>Can WinSight spy on hidden windows? <P> <DT></DT> <DD>Yes. WinSight shows hidden windows as well as visible windows. <P> <DT></DT> <DD><B>7. </B>What's the fastest way to locate a window in the WinSight Window Tree? <P> <DT></DT> <DD>Choose Window|Follow to Focus from the main menu and then click on the window you want to spy on. <P> <DT></DT> <DD><B>8. </B>How can you have your editor files automatically saved each time your program runs through the debugger? <P> <DT></DT> <DD>Turn on the Editor files option on the Preferences page (Autosave options section) of the Environment Options dialog box. <P> <DT></DT> <DD><B>9. </B>Where do you go to rearrange the contents of the Component Palette? <P> <DT></DT> <DD>Use the Palette page of the Environment Options dialog box. <P></DL><H2><A NAME="Heading11"></A>Day 12</H2><DL> <DT></DT> <DD><B>1. </B>What component can you use to draw graphics on a form? <P> <DT></DT> <DD>Although you can draw directly on the form's canvas, the PaintBox component enables you to draw in a predefined area of a form (the area the PaintBox occupies). <P> <DT></DT> <DD><B>2. </B>Which TCanvas property controls the fill color of the canvas? <P> <DT></DT> <DD>The Brush property. <P> <DT></DT> <DD><B>3. </B>What does a clipping region do? <P> <DT></DT> <DD>The clipping region defines a canvas area within which drawing can take place, but outside which no drawing takes place. Any drawing outside the clipping region won't be displayed. <P> <DT></DT> <DD><B>4. </B>What function do you use to draw multiple lines of text on a canvas? <P> <DT></DT> <DD>The DrawText function with the DT_WORDBREAK flag. <P> <DT></DT> <DD><B>5. </B>What TCanvas method can be used to draw a bitmap with a transparent background? <P> <DT></DT> <DD>The BrushCopy method. <P> <DT></DT> <DD><B>6. </B>Which TCanvas method do you use to copy an entire bitmap to a canvas? <P> <DT></DT> <DD>You can use several, but the easiest and fastest is the Draw method. Others include BrushCopy, StretchDraw, and CopyRect. <P> <DT></DT> <DD><B>7. </B>How do you save a memory bitmap to a file? <P> <DT></DT> <DD>With the SaveToFile method. <P> <DT></DT> <DD><B>8. </B>What component do you use to play a wave file? <P> <DT></DT> <DD>The TMediaPlayer component. To play a wave file using the Windows API, use the PlaySound function. <P> <DT></DT> <DD><B>9. </B>What is the TimeFormat property of TMediaPlayer used for? <P> <DT></DT> <DD>The TimeFormat property is used to set the time format based on the media type being played. Some media types can use several time formats (CD audio, for example). <P> <DT></DT> <DD><B>10. </B>Can you record wave audio with the MediaPlayer component? <P> <DT></DT> <DD>Yes, but you have to jump through some hoops. <P></DL><H2><A NAME="Heading12"></A>Day 13</H2><DL> <DT></DT> <DD><B>1. </B>How do you attach an event handler to a toolbar button's OnClick event? <P> <DT></DT> <DD>In the Object Inspector, click the Event tab. Click the drop-down arrow next to the OnClick event. Choose an event handler from the list. <P> <DT></DT> <DD><B>2. </B>Can you put controls other than buttons on toolbars? <P> <DT></DT> <DD>Yes. You can put virtually any type of component on a toolbar. Combo boxes are commonly found on toolbars. <P> <DT></DT> <DD><B>3. </B>What is the name of the TActionList event you respond to when doing command enabling? <P> <DT></DT> <DD>The OnUpdate event. <P> <DT></DT> <DD><B>4. </B>What does the SimplePanel property of the StatusBar component do? <P> <DT></DT> <DD>It forces the status bar to have a single panel. <P> <DT></DT> <DD><B>5. </B>How do you change the status bar text manually? <P> <DT></DT> <DD>For a simple status bar, use the following: <P></DL><BLOCKQUOTE> <PRE>StatusBar.SimpleText := `Text';</PRE></BLOCKQUOTE><PRE></PRE><DL> <DT></DT> <DD><B>6. </B>How do you enable and disable menu items and buttons? <P> <DT></DT> <DD>For individual components, set the component's Enabled property to True to enable the component or False to disable it. For several components that have a common task, create an Action for that task and set the Action's Enabled property accordingly. <P> <DD><B>7. </B>How do you access the printer in a Delphi application? <DT></DT> <DD>Through the Printer function. <P> <DT></DT> <DD><B>8. </B>What method do you call to begin printing with the TPrinter class? <P> <DT></DT> <DD>The BeginDoc method. <P> <DT></DT> <DD><B>9. </B>What method of TPrinter do you call when you want to start a new page when printing? <P> <DT></DT> <DD>The NewPage method. <P> <DT></DT> <DD><B>10. </B>How do you change the cursor for a component at runtime? <P> <DT></DT> <DD>Modify the component's Cursor property. <P></DL><H2><A NAME="Heading13"></A>Day 14</H2><DL> <DT></DT> <DD><B>1. </B>How do you set the help file that your application will use? <P> <DT></DT> <DD>Use the Project Options dialog (Application page) or set the HelpFile property of the Application object at runtime. <P> <DT></DT> <DD><B>2. </B>How do you implement F1 key support for a particular form or dialog box? <P> <DT></DT> <DD>Just assign a nonzero value to the HelpContext property. Make sure that there is a corresponding help context ID in the help file and that the help file has been set for the application. <P> <DT></DT> <DD><B>3. </B>What method do you call to display the index for your help file? <P> <DT></DT> <DD>The HelpCommand method. <P> <DT></DT> <DD><B>4. </B>What types of objects can an exception raise? <P> <DT></DT> <DD>Any class derived from Exception. <P> <DT></DT> <DD><B>5. </B>Is it legal to have more than one except statement following a try statement? <P> <DT></DT> <DD>No, there can only be one except statement. <P> <DT></DT> <DD><B>6. </B>How do you raise an exception? <P> <DT></DT> <DD>With the raise keyword--for example, <P></DL><BLOCKQUOTE> <PRE>raise EMyException.Create(`An error occurred.');</PRE></BLOCKQUOTE><PRE></PRE><DL> <DT></DT> <DD><B>7. </B>What is the default value of the TRegistry class RootKey property? <P> <DT></DT> <DD>\HKEY_CURRENT_USER <P> <DT></DT> <DD><B>8. </B>Must you call CloseKey when you are done with a key? <P> <DT></DT> <DD>No. The TRegistry destructor will close the key for you. You shouldn't leave a key open indefinitely, though. <P> <DT></DT> <DD><B>9. </B>What is the difference between SendMessage and PostMessage? <P> <DT></DT> <DD>PostMessage posts the message to the Windows message queue and returns immediately. SendMessage sends the message and doesn't return until the message has been handled. <P> <DT></DT> <DD><B>10. </B>What is the name of the VCL method that is used to send a message directly to a component? <P> <DT></DT> <DD>The Perform method. <P></DL><H2><A NAME="Heading14"></A>Day 15</H2><DL> <DT></DT> <DD><B>1. </B>What is the base (or parent) interface for all COM interfaces? <P> <DT></DT> <DD>The base interface from which all other interfaces are derived is IUnknown. <P> <DT></DT> <DD><B>2. </B>What is a GUID? <P> <DT></DT> <DD>A GUID is a 128-bit integer that uniquely identifies a COM object (interface, class, or type library). <P> <DT></DT> <DD><B>3. </B>What happens when a COM object's reference count reaches 0? <P> <DT></DT> <DD>When a COM object's reference count reaches 0, the COM object is unloaded from memory by Windows. <P> <DT></DT> <DD><B>4. </B>What is the name of the Delphi utility used when working with type libraries? <P> <DT></DT> <DD>The utility used to modify type libraries is the Type Library Editor. <P> <DT></DT> <DD><B>5. </B>How do you create GUIDs when writing COM objects in Delphi? <P> <DT></DT> <DD>You don't have to specifically create GUIDs when creating COM objects in Delphi. Delphi creates the GUIDs for you automatically (trick question, I know). If you want to specifically create a GUID in your code, you can press Ctrl+Shift+G in the Code Editor. Delphi will generate and insert a GUID in your code. <P> <DT></DT> <DD><B>6. </B>What do you choose from the Object Repository when creating an ActiveX from a VCL component? <P> <DT></DT> <DD>To create an ActiveX control from an existing VCL component, choose the ActiveX Control item in the Object Repository. <P> <DT></DT> <DD><B>7. </B>Can you use Delphi-created ActiveX controls in Visual Basic? <P> <DT></DT> <DD>Yes, you can use Delphi ActiveX controls in VB. You must be sure that the ActiveX contains version information, but otherwise a Delphi ActiveX should work in VB with no trouble. <P> <DT></DT> <DD><B>8. </B>After your ActiveX control is built and registered, how do you install it to the Delphi Component palette? <P> <DT></DT> <DD>To install an ActiveX control to the Delphi Component palette, choose Component | Import ActiveX Control from the Delphi main menu. <P> <DT></DT> <DD><B>9. </B>How do you unregister an ActiveX that you have created? <P> <DT></DT> <DD>To unregister an ActiveX control, you can either choose Run | Unregister ActiveX Server from the main menu or you can run the TREGSVR utility on the ActiveX with the -u switch. You can also uninstall an ActiveX control from the Import ActiveX dialog box. <P> <DT></DT> <DD><B>10. </B>Can you use the ActiveX controls created in Delphi on a Web page? <P> <DT></DT> <DD>Yes. Delphi ActiveX controls are designed to be deployed on a Web page. <P></DL><H2><A NAME="Heading15"></A>Day 16</H2><DL> <DT></DT> <DD><B>1. </B>What is a local database? <P> <DT></DT> <DD>A database that resides on the user's machine rather than on a database server. This term usually refers to Paradox or dBASE tables. <P> <DT></DT> <DD><B>2. </B>What is the purpose of the BDE? <P> <DT></DT> <DD>The BDE provides your Delphi application access to databases. <P> <DT></DT> <DD><B>3. </B>Are a dataset and a table the same thing? If not, explain the difference. <P> <DT></DT> <DD>No, they are not the same thing. A dataset might include an entire table's contents, or it might contain only a small subset of the table. <P> <DT></DT> <DD><B>4. </B>Name one advantage of cached updates. <P> <DT></DT> <DD>Cached updates reduce network traffic, enable you to modify a read-only dataset, and enable you to make several changes and then either commit or roll back all changes at once. <P> <DT></DT> <DD><B>5. </B>What is a stored procedure? <P> <DT></DT> <DD>An application that acts on a database and resides on a database server. <P> <DT></DT> <DD><B>6. </B>What is the purpose of the SQL property of the TQuery component? <P> <DT></DT> <DD>The SQL property contains the SQL statements to execute when the Open or Execute methods are called. <P> <DT></DT> <DD><B>7. </B>Name one reason you might want to use your own TDatabase object instead of the default. <P> <DT></DT> <DD>To allow automatic login to a database. <P> <DT></DT> <DD><B>8. </B>Why would you want to keep a connection to a remote database open even when you are not currently using the connection? <P> <DT></DT> <DD>To reduce the time required to log in to the database each time a connection is requested. <P> <DT></DT> <DD><B>9. </B>What does the TBatchMove component do? <P> <DT></DT> <DD>TBatchMove enables you to create or modify one dataset with the contents of another dataset. <P> <DT></DT>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -