DelphiDabbler Code Snippets Database

Snippet Selection

The following snippets from the Code Snippets Database have been requested.

TaskbarHandle

Returns the window handle of the Windows task bar.

function TaskbarHandle: Windows.THandle;
begin
  Result := Windows.FindWindow('Shell_TrayWnd', nil);
end;

TrayHandle

Returns the window handle of the system tray area of the Windows task bar.

function TrayHandle: Windows.THandle;
begin
  Result := Windows.FindWindowEx(TaskbarHandle, 0, 'TrayNotifyWnd', nil);
end;

View the whole database.

Go to the DelphiDabbler website.