GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  Delphi
Go To First  |  Previous Question  |  Next Question 
 Delphi  |  Question 4 of 27    Print  
How is message handling handled in Delphi?

  
Total Answers and Comments: 2 Last Update: July 16, 2009     Asked by: nehalshah 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
January 09, 2009 08:18:55   #1  
delphiking Member Since: January 2009   Contribution: 3    

RE: How is message handling handled in Delphi?
Through event handlers. You can also define your own messages using the WMUSER constant.
 
Is this answer useful? Yes | No
July 16, 2009 12:54:05   #2  
EditCDC Member Since: July 2009   Contribution: 5    

RE: 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)

 
Is this answer useful? Yes | No

 Related Questions

Here are some suggested Delphi interview questions. Describe how components are loaded from a DFM file at runtime. What is the difference between TGraphicControl and TWinControl? Write a function that reverses a string. If a component has another component as a property (example: TDatasource has a TDataset component as a property), what happens if the “pointed to“ component is deleted? Where does TCustomControl fit into the VCL heirarchy? What is the purpose
Read Answers (1) | Asked by : Ronald Vijay

Latest Answer : RTTI - Runtime type informartion, we can use is and as  key work we can use at runtime.  Using is we can find the control at run time Using as we can create control at run time ...
Read Answers (1) | Asked by : yogesh

Latest Answer : Components are commonly of two kindsVisual and Non-visualEx. VisualLabelsEdit boxesA visual component is one that helps make graphical building blocks.Ex. Non-visualTQueryTThread/Timer ...

Latest Answer : Define custom messageconst  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  ...

Latest Answer : DeclarationADynamicCharArray :  ^CharArrayType;AllocationADynamicCharArray := AllocMem(NumChars * sizeof(char)); ReleaseFreeMem(ADynamicCharArray, NumChars * sizeof(char)); ...

Latest Answer : To add a new code unit in Delphi choose File-New ... Unit.//**blank code unitunit Unit2;interface{interface code goes here}implementation{implementation code goes here}end. //this ends the unit ...

Latest Answer : Object Pascal ...

Latest Answer : 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 file). It also instantiates the auto-create forms. We ...
Read Answers (1) | Asked by : Robert

Latest Answer : Hi Robert OnCalculate is event in Delphi it trigerrs when you are reading data from the database .NOTE : It trigerrs on reading each row Stupid Example :if you want to subtract two coolumns from database table then you override this event with ...
Read Answers (1) | Asked by : Robert

Latest Answer : Interface clause is used to represent the interface scetion in delphi. The interface contains the type declarations, var declarations. ...


 Sponsored Links

 
Related Articles

Using XMLType for Handling XML Data in the Database

Using XMLType for Handling XML Data in the Database Being an object type XMLType can not only be used to store XML data in the database but also to operate on that data via its built in methods Regardless of the storage model you choose XMLType provides a set of XML specific methods to operate on XM
 

ODP.NET - Handling Nulls when Working with OracleDataReader

ODP NET Handling Nulls when Working with OracleDataReader When we work with OracleDataReader or for that matter even with data rows in a data table we may come across nulls The following is the efficient way to deal in with such scenarios mosgoogle geshibot language VB NET" create connect
 

ODP.NET - Handling Nulls when Executing with ExecuteScalar

ODP NET Handling Nulls when Executing with ExecuteScalar The most important issue to remember is that ExecuteScalar simply returns an object type of data The object refers to any data type within NET If the data type of your variable matches with the type of object returned by ExecuteScalar an impli
 

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

C++ String Representation and Handling

C String Representation and Handling In this C tutorial you will learn about string representation and handling how is string represented end string notation initializing char array character representation string literals example programe to understand the character array concept and the accessing
 

String handling functions

What is the string handling functions present in header file <string.h>? There are number of string handling functions present in string.h. In other words if a programmer uses any of the function present in string.h then they must include the header file as #include <string.h&am
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape