What is the default extension of file when we create user components?
What are the active x control in delphi 6?
How does the OOPS concepts/feature like encapsulation, polymorphism, abstraction etc are implemented in delphi? Provide an example.
How is message handling handled in delphi?
Define custom message
const
WM_MY_MESSAGE = WM_USER + 0;
Define handler for message
type
TMyForm = class(TForm)
private
procedure OnMyMessage(var Msg: TMessage); message WM_MY_MESSAGE;
Send or Post message
PostMessage(self.Handle,WM_MY_MESSAGE,0,0)
Through event handlers. You can also define your own messages using the WMUSER constant.
TGraphicControl vs TWinControlThe TGraphicControl class provides the capability to have controls which are not windowed controls (they have no window handle). TWinControl is the base class from whic...
What is contained in the code unit of delphi?
To add a new code unit in Delphi
choose File-New ... Unit.
//**blank code unit
unit Unit2;
interface
{interface code goes here}
implementation
{implementation code goes here}
end. //this ends the unit
How is dynamic array's memory space removed in delphi?
Declaration
ADynamicCharArray : ^CharArrayType;
Allocation
ADynamicCharArray := AllocMem(NumChars * sizeof(char));
Release
FreeMem(ADynamicCharArray, NumChars * sizeof(char));
By using the finalize keyword
What are components in delphi?
Components are commonly of two kinds
Visual and Non-visual
Ex. Visual
Labels
Edit boxes
A visual component is one that helps make graphical building blocks.
Ex. Non-visual
TQuery
TThread/Timer
What is the use of database form wizard in delphi?
This wizard helps you to build a Database Form with Ttabale, TDatasource and all the TDatabaseEdit Control without you droping each component.
Cheers,
Vijay
What is the use of initialization and finalization sections of delphi?
The initialization section isĀ optional. It begins with the reserved word initialization and continues until the beginning of the finalization section or, if there is no finalization section, until th...
Every delphi unit(pas file) you can have Initialization and Finalization section which will be executed during unit load and unlond respectively
Unit2.pas
unit Unit2;
interface
uses
implementation
Initialization
//Do your Initialization Steps Here
Finalization
//Do your Finalization Steps Here
end.
What must be done to make scroll bars appear automatically in delphi?
Set the form's autoscroll property to true.
What is project file in delphi?
File with .dpr extension is the project file. It comprises all the unit names used in the application along with their path in the hard disk (and the form name if the unit is associated with a .dfm fi...
What is the clause used with interface section of delphi?
Interface clause is used to represent the interface scetion in delphi. The interface contains the type declarations, var declarations.
What is tform object in delphi?
Tform is the .dfm file associated with any delphi application. Tform acts as a parent and owner for the components placed on it. Every .dfm file has a .pas file associated with end.
What is the environment on which delphi was based?
Object Pascal
What are the code sections that get added automatically by delphi when a form is created?
unit {unit name}
uses
interface
type
end;
var
implementation
Container is used to hold the components. It's the responsibility of the container to request the visible controls placed on it to paint themselves. The container is also responsible for creating and...
What is the use of tactiveform object in delphi?
TActiveForm is the base class for a VCL Form exposed as an ActiveX control. TActiveForm represents a form that is created by a class factory (in Delphi) or using the Active Template Library (C++) and ...
What is the use of GLobalmemorystatus() function in delphi?
It is a function in Delphi to find the Total memory status.It accepts TMemoryStatus variable as var parameter.It fills the variable entity with different memory status info like Total phisical...
.dcp