procedure TForm1.Button1Click(Sender: TObject); begin if IsWindowEnabled(Button2.Handle) then Label1.Caption := 'Enable' else Label1.Caption := 'Disabled';
if IsWindowVisible(Button2.Handle) then Label2.Caption := 'Enable' else Label2.Caption := 'Disabled'; end;