Hallo!
So muesste es funktionieren:
Delphi-Quellcode:
const
WM_DTPCloseUp = WM_USER + 111; // benutzerspez. Nachricht
type
TForm1 = class(TForm)
DateTimePicker1: TDateTimePicker;
procedure DateTimePicker1CloseUp(Sender: TObject);
private
{ Private declarations }
procedure WmAfterShow(var Msg: TMessage); message WM_DTPCloseUp;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.WmAfterShow(var Msg: TMessage);
begin
// Dein langer Code...
end;
procedure TForm1.DateTimePicker1CloseUp(Sender: TObject);
begin
PostMessage(Self.Handle, WM_DTPCloseUp, 0, 0);
end;