i have other question i know you will save me also i set on click event to create parent form like this
Delphi-Quellcode:
procedure TMAIN.btnVolClick(Sender: TObject);
var
Rect: TRect;
volfrm : Tvolfrm;
begin
volfrm := Tvolfrm.Create(nil);
try
GetWindowRect(btnVol.Handle, Rect);
if not Assigned(volfrm) then
begin
volfrm:= Tvolfrm.CreateParented(0);
volfrm.FormStyle := fsStayOnTop;
end;
volfrm.Left := Rect.Left;
volfrm.top := Rect.Top - volfrm.Height;
finally
volfrm.Show;
end;
end;
i want if i click on the same button again the parented form hide