Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
// Declare your message that your app will respond to
[b]const CW_FREEPANEL = WM_USER + WM_APP + 123;[/b]
type
TForm1 = class(TForm)
{ private declarations }
// Declare the procedure that will respond to CW_FREEPANEL
procedure FreeThisPanel(var msg: TMessage); message CW_FREEPANEL;
procedure TForm1.FreeThisPanel(var Msg: TMessage);
begin
// Reads out WParam to know which panel to free
TTabSheet(msg.WParam).Free;
end;
procedure TForm1.thisButton(Sender: TObject);
begin
// Posts the message with the offending panel in WParam
PostMessage(Self.Handle, CW_FREEPANEL, integer((Sender as TButton).Parent), 0);
end;