Hi,
I get an Acess-Violation with the DateTimePicker.
I can reproduce the error, when put the DateTimePicker at a frame and call a window with the frame from mainform.
I can stop this error by insert a "if (frm = nil) then Exit;" in the "UpdateTimePicker".
I change it to:
if not FTimePicker.Visible and (not (csLoading in ComponentState) or (csDesigning in ComponentState)) then
begin
FTimePicker.Free;
FTimePicker := nil;
end
else
begin
frm := GetParentForm(Self);
if (frm = nil) then
Begin
Exit;
End;
DropW := Round(DROPDOWNBTN_WIDTH * GetDeviceCaps(frm.Canvas.Handle, LOGPIXELSY) / 96);
and can remove this error. I don't know if this is the right way, so please check if this change is meaningful. I hope you can reproduce this error or at least can find a way to stop this error for me.
Thanks for reading so far.
Greetings from germay
Peter Nomden