i am about to understand how to show a form on click and hide it on click on the same button again
here is how i show the form
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;
how to hide the for again on click the same button