The problem is the next:
- A component has an event assigned
- The code of the component is using Assigned function to detect if the event is assigned or not
- The code of the component is not making any kind of checking about if the component is in DesingState or not to fire the event (it is only checking if the event is Assigned)
- In 64 bits, in design mode, Assiged function is returning true and the component tries to fire the event (in desing mode), generating an exception.
This problem was first time detected in TTimer tick, but now I have the same problem with TPageControl (OnChage event). The implementation of this event in VCL is the following one:
if TabIndex >= 0 then
if csDesigning in ComponentState then
Form := GetParentForm(Self);
if (Form <> nil) and (Form.Designer <> nil) then
The invocation to the base is clase is made even if the component is in designe state. The implementation in the base class is:
if Assigned(FOnChange) then FOnChange(Self);
In 64 bits mode, even in design time, the OnChague event is fired, and an exception is generated.
Do you have any solution to this problem? It affects to most of the VCL component and makes to work in 64 bits mode almost impossible.