docs: section L — Windows startup (--tray)
L1 hidden start with no taskbar button, L2 the button coming back on restore, L3 the normal launch (validated). Records why every fix placed inside the form was powerless: the FMX proxy is shown before FormCreate is reached. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -443,6 +443,40 @@ est précisément le piège de coalescence documenté dans CLAUDE.md.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## L — Démarrage avec Windows (`-tray`, série 2026-07-26)
|
||||||
|
|
||||||
|
Le flag `-tray` est ce que « Start with Windows » écrit dans `HKCU\…\Run`
|
||||||
|
(`"<exe>" -tray`). Pour tester sans redémarrer : `PMServer.exe -tray` depuis le
|
||||||
|
dossier de sortie. **Ne pas** laisser `-tray` dans *Run → Parameters* de l'IDE,
|
||||||
|
sinon chaque F9 démarre caché.
|
||||||
|
|
||||||
|
### L1 · démarrage caché, sans bouton de barre des tâches
|
||||||
|
- **ACTION** : lancer avec `-tray` (l'app n'étant pas déjà lancée — sinon le
|
||||||
|
mutex single-instance fait sortir la nouvelle instance immédiatement).
|
||||||
|
- **ATTENDU** : **aucune fenêtre**, **aucun bouton** dans la barre des tâches,
|
||||||
|
icône présente dans le tray, pas de balloon.
|
||||||
|
- **Historique** : le bouton restait 1-2 s. La fenêtre du formulaire n'était en
|
||||||
|
fait **jamais** visible — c'est le proxy taskbar FMX (`ApplicationHWND`) qui
|
||||||
|
s'affichait, et **avant** même que `FormCreate` soit atteint, ce qui rendait
|
||||||
|
inopérant tout correctif posé depuis le formulaire. Le masquer ne suffit pas
|
||||||
|
non plus : il faut retirer `WS_EX_APPWINDOW` et poser `WS_EX_TOOLWINDOW`,
|
||||||
|
depuis le `.dpr`, juste après `Application.Initialize`.
|
||||||
|
|
||||||
|
### L2 · le bouton revient à la restauration
|
||||||
|
- **ACTION** : après L1, clic sur l'icône du tray.
|
||||||
|
- **ATTENDU** : la fenêtre s'ouvre **et** le bouton réapparaît dans la barre
|
||||||
|
des tâches.
|
||||||
|
- **Historique** : `WS_EX_TOOLWINDOW` est permanent — sans le rétablissement
|
||||||
|
(`TrayProxyShowInTaskbar` dans `RestoreWindowFromTray`) l'app tournait
|
||||||
|
ensuite sans aucune entrée de barre des tâches.
|
||||||
|
|
||||||
|
### L3 · lancement normal (non-régression) ✅
|
||||||
|
- **ACTION** : lancer **sans** `-tray`.
|
||||||
|
- **ATTENDU** : fenêtre visible et bouton de barre des tâches présents, comme
|
||||||
|
avant. Le correctif est entièrement gardé par le flag.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Reste à traiter (constaté pendant l'audit, non corrigé)
|
## Reste à traiter (constaté pendant l'audit, non corrigé)
|
||||||
|
|
||||||
1. **Attachments hors garde A11.** Le contrôle « changed elsewhere » couvre le
|
1. **Attachments hors garde A11.** Le contrôle « changed elsewhere » couvre le
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ $(PreBuildEvent)]]></PreBuildEvent>
|
|||||||
<Icon_MainIcon>PMServer_Icon1.ico</Icon_MainIcon>
|
<Icon_MainIcon>PMServer_Icon1.ico</Icon_MainIcon>
|
||||||
<UWP_DelphiLogo44>app.png</UWP_DelphiLogo44>
|
<UWP_DelphiLogo44>app.png</UWP_DelphiLogo44>
|
||||||
<UWP_DelphiLogo150>app.png</UWP_DelphiLogo150>
|
<UWP_DelphiLogo150>app.png</UWP_DelphiLogo150>
|
||||||
|
<Debugger_RunParams>-tray</Debugger_RunParams>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<DelphiCompile Include="$(MainSource)">
|
<DelphiCompile Include="$(MainSource)">
|
||||||
@@ -1251,8 +1252,7 @@ $(PreBuildEvent)]]></PreBuildEvent>
|
|||||||
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
|
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
|
||||||
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
|
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
|
||||||
<PropertyGroup Condition="'$(Config)'=='Debug' And '$(Platform)'=='Win32'">
|
<PropertyGroup Condition="'$(Config)'=='Debug' And '$(Platform)'=='Win32'">
|
||||||
<PreBuildEvent>"Z:\password-manager\delphi-backend\assets\BuildAssets.cmd"
|
<PreBuildEvent>"Z:\password-manager\delphi-backend\assets\BuildAssets.cmd"</PreBuildEvent>
|
||||||
</PreBuildEvent>
|
|
||||||
<PreBuildEventIgnoreExitCode>False</PreBuildEventIgnoreExitCode>
|
<PreBuildEventIgnoreExitCode>False</PreBuildEventIgnoreExitCode>
|
||||||
<PreLinkEvent/>
|
<PreLinkEvent/>
|
||||||
<PreLinkEventIgnoreExitCode>False</PreLinkEventIgnoreExitCode>
|
<PreLinkEventIgnoreExitCode>False</PreLinkEventIgnoreExitCode>
|
||||||
|
|||||||
Reference in New Issue
Block a user