delphi - What's the difference between TForm.Close and closing via a form's handle? -
my application has 1 main form , have button on form close/exit application. it's written phone call windows close handle:
sendmessage(handle, wm_close, 0, 0);
but i'm wondering what's harm in using:
formname.close;
what's proper usage here? there reason utilize sendmessage?
they same thing. in fact, in forms.pas
find
procedure wmclose(var message: twmclose); message wm_close; ... implementation ... procedure tcustomform.wmclose(var message: twmclose); begin close; end;
showing wm_close
message translates self.close
.
generally, should utilize close
if can, since more delphi-ish , shorter.
forms delphi winapi
No comments:
Post a Comment