This question is based upon the figure shown below
![]() |
From the code shown, how many times would the ShowMessage procedure be called if the button in question was clicked three (3) times? |
Correct Answer:
2
Note: This Question is unanswered, help us to find answer for this one
Which of the following retrieves the value from the SNumber field as a string for the current record in an open Table called Table1?
Correct Answer:
Table1.FieldByName('SNumber').AsString;
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the correct code to cause a popup menu named Popupmenu1 on a form called Form1 to be displayed?
Correct Answer:
Application.DisplayMenu(Form1.Popupmenu1);
Note: This Question is unanswered, help us to find answer for this one
Given a TPageControl component called PageControl1 with three TabSheets called TabSheet1, TabSheet2 and TabSheet3 (in that order), which of the following will make TabSheet2 selected?
Correct Answer:
PageControl1.TabIndex:=1;
Note: This Question is unanswered, help us to find answer for this one
Which key toggles between the Object Inspector and the Edit Window / Form?
Correct Answer:
F11
Note: This Question is unanswered, help us to find answer for this one
What is the purpose of the Initialization section of a Unit?
Correct Answer:
It contains statements that are executed on unit start up
Note: This Question is unanswered, help us to find answer for this one
What is the purpose of the AlphaBlend property of TForm?
Correct Answer:
It specifies if the form is translucent or not
Note: This Question is unanswered, help us to find answer for this one
What is the purpose of the TDataModule?
Correct Answer:
To provide a location for centralized handling of non-visual components
Note: This Question is unanswered, help us to find answer for this one
What does the procedure shown do?
Correct Answer:
It copies the contents of the file c:\autoexec.bat to the file c:\outfile.txt
Note: This Question is unanswered, help us to find answer for this one
What is the purpose of Code Templates?
Correct Answer:
To provide easy access to commonly used programming statements
Note: This Question is unanswered, help us to find answer for this one
Which of the following properties when set to True, enables an application to gain sole access to a database?
Correct Answer:
TDatabase.Exclusive
Note: This Question is unanswered, help us to find answer for this one
Given a ComboBox named ComboBox1 and an Edit box named Edit1, which of the following is the correct code to add the information in the Edit box to the drop down list in the ComboBox?
Correct Answer:
ComboBox1.Items.Add(Edit1.Text);
Note: This Question is unanswered, help us to find answer for this one
The TTimer component has a property which determines how frequently the OnTimer event occurs. Which of the following is that property and what does the property measure?
Correct Answer:
Property: Interval, Measured in: Milliseconds (1/1000 Sec)
Note: This Question is unanswered, help us to find answer for this one
What is the shortcut key for manually displaying the code completion window while entering code?
Correct Answer:
CTRL + SPACE
Note: This Question is unanswered, help us to find answer for this one
What is the purpose of the AutoMerge property in the TMainMenu component?
Correct Answer:
It determines if main menus of secondary forms merge with the main menu of the main form in non-MDI applications at runtime
Note: This Question is unanswered, help us to find answer for this one
When will the code "Application.Terminate;" be executed in the code shown?
Correct Answer:
When the user presses the Ok button
Note: This Question is unanswered, help us to find answer for this one
Which of the following is NOT an event of the TApplicationEvents component?
Correct Answer:
OnBusy
Note: This Question is unanswered, help us to find answer for this one
Which of the following removes the SQL statement from a TQuery component called Query1?
Correct Answer:
Query1.SQL.Clear;
Note: This Question is unanswered, help us to find answer for this one
In the code shown, TMyClass inherits from which parent class?
Correct Answer:
TObject
Note: This Question is unanswered, help us to find answer for this one
What does the TDBLookupComboBox component do?
Correct Answer:
It performs a search for a field with the same name as the text entered
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the correct code to "tick" a TCheckBox component called CheckBox1 as shown?
Correct Answer:
CheckBox1.Checked:=True;
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the correct code to cause a form named Form1 to be displayed as modal?
Correct Answer:
Form1.ShowModal;
Note: This Question is unanswered, help us to find answer for this one
Which of the following would cause all the items in a RadioGroup to be appended so that all items appear twice?
Correct Answer:
Radiogroup1.Items.AddStrings(Radiogroup1.Items);
Note: This Question is unanswered, help us to find answer for this one
What is the purpose of the Alignment Palette?
Correct Answer:
To align components to the form, or with each other
Note: This Question is unanswered, help us to find answer for this one
What value is displayed on screen when the procedure test is called?
Correct Answer:
13
Note: This Question is unanswered, help us to find answer for this one
Which of the following changes a TDBNavigator component called DBNavigator1 so that it only displays navigation buttons?
Correct Answer:
DBNavigator1.VisibleButtons := [nbFirst,nbLast,nbPrior,nbNext];
Note: This Question is unanswered, help us to find answer for this one
What is the main difference between TLabel and TStaticText?
Correct Answer:
TStaticText has a Window Handle and can accept focus whereas TLabel does not have a Window Handle and cannot accept focus
Note: This Question is unanswered, help us to find answer for this one
What files end with the .dpk extension?
Correct Answer:
Package Source files
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the correct code to create an object from class TMainForm?
Correct Answer:
Application.CreateForm(TMainForm, MainForm);
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the correct method to activate a modal open dialog box when using the TOpenDialog component?
Correct Answer:
OpenDialog1.Execute;
Note: This Question is unanswered, help us to find answer for this one
How does a TRichEdit differ from a TMemo?
Correct Answer:
TRichEdit allows font attributes to be set, whereas TMemo does not
Note: This Question is unanswered, help us to find answer for this one
Given that x and y are variables declared as type Char, which of the following is NOT a valid Pascal assignment statement?
Correct Answer:
x := y + #22;
Note: This Question is unanswered, help us to find answer for this one
What happens if the TreeView1.Items list is empty when the code "TreeView1.Items.AddFirst(TreeView1.Items[0],'X');" is executed?
Correct Answer:
An ETreeViewError exception is raised with the message 'Invalid Index'
Note: This Question is unanswered, help us to find answer for this one
Which three properties of TProgressBar are responsible for setting the minimum, maximum and current position for the control?
Correct Answer:
Max, Min & Position
Note: This Question is unanswered, help us to find answer for this one
Given the code "Edit1.Hint := 'Customer Name|Enter Customer Name in the edit box';", which of the following is the correct code to retrieve the text after the | character, i.e. "Enter Customer Name in the edit box", when the OnHint handler is called?
Correct Answer:
GetLongHint(Application.Hint);
Note: This Question is unanswered, help us to find answer for this one
Which of the following is a event of TPanel?
Correct Answer:
OnExit
Note: This Question is unanswered, help us to find answer for this one
Which of the following will connect a DataSource to a Table where the Datasource component is call DataSource1 and the Table component is called Table1?
Correct Answer:
DataSource1.DataSet:=Table1;
Note: This Question is unanswered, help us to find answer for this one
What is the value of the variable int_temp after the for loop has ended in the code shown?
Correct Answer:
1
Note: This Question is unanswered, help us to find answer for this one
Which property of TBitBtn allows you to specify what image to display on the button?
Correct Answer:
BitBtn1.Glyph
Note: This Question is unanswered, help us to find answer for this one
What does the Cancel property of the TButton object do?
Correct Answer:
It determines if the button's OnClick event handler is called when the Escape key <Esc> is pressed on the keyboard
Note: This Question is unanswered, help us to find answer for this one
For a TQuery component called Query1 with SQL of "Select * from Student Where Number=500", which of the following is the correct method to run the query?
Correct Answer:
Query1.Active:=True;
Note: This Question is unanswered, help us to find answer for this one
What is the purpose of the "Break" procedure?
Correct Answer:
It causes the flow of control to exit a loop and continue at the next statement following the loop
Note: This Question is unanswered, help us to find answer for this one
Which of the following will link a TUpDown control named UpDown1 with an Edit box named Edit1, allowing the TUpDown control to modify the values in the Edit box?
Correct Answer:
UpDown1.Associate := Edit1;
Note: This Question is unanswered, help us to find answer for this one
What component is used to link two datasets in a master/detail relationship?
Correct Answer:
TDataSource
Note: This Question is unanswered, help us to find answer for this one
Which of the following will add text to a TMemo component called Memo1?
Correct Answer:
Memo1.Lines.Add('Text');
Note: This Question is unanswered, help us to find answer for this one
TDataSet is a base class from which other database components are inherited to encapsulate which database object(s)?
Correct Answer:
A Query
Note: This Question is unanswered, help us to find answer for this one
Which of the following are valid identifier names for a variable?
Correct Answer:
Cust_no5
Note: This Question is unanswered, help us to find answer for this one
Which of the following are the valid DeviceType property values for the TMediaPlayer component?
Correct Answer:
dtAutoSelect
Note: This Question is unanswered, help us to find answer for this one
Delphi MCQs | Topic-wise