Hi guys, I need to create one dynamic form and I need to place one button and assign onclick event to that button, how to I assign that event in my coding. unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Buttons, Vcl.DBGrids, Data.DB,Bde.DBTables, Vcl.grids; function Dynamicform(OwnerFrom : TComponent;DetailName : string;parentcom : TWinControl):Boolean; implementation function Dynamicform(OwnerFrom : TComponent;DetailName : string;parentcom : TWinControl):Boolean; var FDetailForm : TForm; dButton : TBitBtn; begin with OwnerFrom do begin if not Assigned(TForm(OwnerFrom.FindComponent(DetailName))) then begin TForm.Create(OwnerFrom).Name := DetailName; FDetailForm := TForm(OwnerFrom.FindComponent(DetailName)); with FDetailForm do begin Position := poOwnerFormCenter; BorderIcons := [...