eec7bc4f80
The .dpr version crashed with an EAccessViolation writing to 000000CE — touching MainForm.Visible/Handle between CreateForm and Run is evidently too early for FMX. Reverted; the app builds and runs as before. Replaced with a one-shot OnActivate handler installed in FormCreate only for --tray: it fires the instant FMX shows the form, hides it (FMX + Win32) and unhooks itself, so it can never fight the user later. That runs far earlier than the deferred MinimizeToTray, which waits for the message loop and hence for the DB open, server start and WebView2 init — the second the window used to spend on screen. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>