Einzelnen Beitrag anzeigen

drama22

Registriert seit: 12. Jan 2013
88 Beiträge
 
#5

AW: delphi TadvGlowbutton

  Alt 17. Okt 2014, 21:36
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
  Mit Zitat antworten Zitat