News

The Observer Pattern

Author: Joanna C1415 Introduction When we use Delphi to design forms and data modules, every time we place a component on the designer, several things change: the form now shows an appropriate representation of the component, the object inspector changes to show the properties of the component and, if we press Alt-F12, we see the .DFM file now contains information about the component. Whether…
Read more
C++

Writing a VCL component in C++ which defines its own events

Author: Embarcadero USA Question and Answer Database FAQ2369C.txt Writing a VCL component in C++ which defines its own events Category :VCL Platform :All Product :C++Builder 3.x Question: I have scoured the Borland BCB docs and the net and I really haven't found a good example of writing a VCL component in C++ which defines its own events (an event not overriding any ancestor class…
Read more
Delphi

Detecting tab key press

Author: Embarcadero USA Question and Answer Database FAQ2060D.txt Detecting tab key press Category :VCL Platform :All Product :All 32 bit Question: Since the KeyPress and the KeyDown events do not get called for the tab key, how do I trap the tab key at the…
Delphi

Using WM_COPYDATA.

Author: Embarcadero USA Question and Answer Database FAQ1525D.txt Using WM_COPYDATA. Category :Windows API Platform :All Product :All 32 bit Question: How can I use the WM_COPYDATA message to pass information between 16-bit and 32-bit…
Delphi

Does Delphi have an equivalent to the Visual Basic SendKeys function?

Author: Embarcadero USA Question and Answer Database FAQ1500D.txt Does Delphi have an equivalent to the Visual Basic SendKeys function? Category :VCL Platform :All Product :All 32 bit Question: Does Delphi have an equivalent to the Visual Basic SendKeys function? Answer: The following example demonstrates procedures that provide the capibility of sending keystrokes to any window…
Read more
Delphi

Preventing multiple application instances

Author: Embarcadero USA Question and Answer Database FAQ1355D.txt Preventing multiple application instances Category :Windows API Platform :All Product :All 32 bit Question: How can I guarantee that only one instance of my program executes? Is it possible to…
Delphi

Changing the papersize of a print job.

Author: Embarcadero USA Question and Answer Database FAQ603D.txt - Changing the papersize of a print job. Category :Printing Platform :All-32Bit Product : Question: How can I change the papersize of my print job? Answer: One way to change printer settings at…
C++

Displaying an error string from GetLastError.

Author: Embarcadero USA Technical Information Database TI2459C.txt Displaying an error string from GetLastError. Category :General Platform :All Product :Borland C++ All Description: Displaying an Error Message with GetLastError GetLastError is a WIN32 API that returns an error code indicating the most recent error. The most recent error will be set by the failing…
Read more