0

I am trying to flash the inactive tabs in a TPageControl. I do something like the following:

for I := 0 to PageControl1.PageCount do
begin
  if PageControl1.Pages[I].Tag = '1' then
  begin
    if PageControl1.ActivePage <> PageControl1.Pages[I] then
    begin
      FlashWindow(PageControl1.Pages[I].PageControl.Handle, True);
    end;
  end;
end;

But I still cannot flash the inactive PageControl tab. Is there any reference on how to flash inactive tabs in a page control? Or even how to get the inactive tab handles?

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
Vlark.Lopin
  • 762
  • 10
  • 21
  • 4
    `PageControl1.Pages[I].PageControl.Handle` is the same as `PageControl1.Handle`, ie the `HWND` of the PageControl itself. Which you can't flash. Even if you got the `HWND` of the individual tabs (which you can't, because they don't have their own `HWND`s), you still can't flash them with `FlashWindow()`. That function works only with top-level windows that have a caption bar and/or appear on the Taskbar. If you want to flash PageControl tabs, you are going to have to owner-drawn them manually using the PageControl's `OnDrawTab` event instead. – Remy Lebeau Mar 21 '17 at 23:54
  • i couldn't figure out how to flash the tab @RemyLebeau – Vlark.Lopin Mar 21 '17 at 23:55
  • 1
    ok i got it i need to change the whole mechanism , i will use `drawtab `event – Vlark.Lopin Mar 22 '17 at 00:00

0 Answers0