Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-11

Win32 and system tray

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Thomas Schatzl
to Bernhard Steffen

Subject: [fpc-pascal]Win32 and system tray

I'm trying to make a program run in the system tray instead insinde a window. Can somebody give me a hint (URL?) on how to achieve this?

Shell_NotifyIcon() is the method you're searching for, it controls all system tray related stuff. I think there was some unit wrapping its functionality on the contribs page (not sure about this).

[http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/fu nctions/shell_notifyicon.asp]

In order to hide your application window from the taskbar and alt-tab dialog create your window with WS_EX_TOOLWINDOW in the dwExStyle param of CreateWindowEx() and don't specify WS_VISIBLE in the dwStyle param. It's exact description can be found on msdn.microsoft.com as well.

Hth,
Thomas

Reply by email